Hi everyone
starting my AI I had this problem, the AI is supposed follow player to a very close distance to use a melee attack but on running to the player it shoots a MG normally, the problem is while running I can't stop the run animation for reloading so he looks like he's skating while reloading
here's wut I got so far..
;Artificial Intelligence Script
;Header
desc = Shoot Very Close
;Triggers
:state=0,plrcanbeseen:settarget,state=1
:state=0,shotdamage=5:settarget,state=1
:state=0,noiseheard=50:settarget,state=1
:state=1:rotatetoplr
:state=1,ifweapon=1,plrcanbeseen,plringunsight=1:useweapon,rundecal=6
:state=1,ifweapon=0:state=2,animate=1,setframe=6
:state=1,shotdamage=5:state=10
:state=1,plrcannotbeseen:followplr
:state=1,plrdistwithin=200,plrcanbeseen:state=5
:state=1,plrdistfurther=200,plrelevwithin=10:rotatetoplr,settarget,rotatetotarget,movetotarget=1,animate=5
:state=2:incframe=6
:state=2,frameatend=6:state=1,reloadweapon,sound=audiobank\guns\reload.wav
:state=10,random=1:state=3,setframe=4
:state=10:state=4,setframe=3
:state=3:incframe=4
:state=3:rotatetoplr,strafe=90,rotatetoplr
:state=3,frameatend=4:state=1,animate=1
:state=4:incframe=3
:state=4:rotatetoplr,strafe=-90,rotatetoplr
:state=4,frameatend=3:state=1,animate=1
:state=5,random=1,rateoffire:plraddhealth=-20
:state=5,random=2,rateoffire:plraddhealth=-30
:state=5,random=3,rateoffire:plraddhealth=-40
:state=5:state=1
;End of Script
~Level my Dragon~[/url]
Best Wishes..