Hey all here is what i wanted the code to do. I wanted the code that will allow the player to strife, also the script will give the npc the ablity to shoot off 4 clips of ammo. after they run out of ammo if the player is still in range of the entity it will remove 500 health from player and make its own health 0 killing itself. Is there a way to make the entety animate somthing at the last part so the player can tell its exploding? here is the code i have now.
Please note this code is for the shoot ai
:state=0:state=1,localvar=1,setvar=4
:state=1:rotatetoplr
:state=1,plrdistfurther=500:movefore=4,animate=55
:state=1,plrdistwithin=400:moveback=4,animate=55
:state=1,plrdistwithin=500,plrdistfurther=400:animate=51,state=5
:state=1,plrcannotbeseen:state=2
:state=1,plringunsight=1:useweapon
:state=1,ifweapon=0,VARGREATER=0:state=10,setframe=56
:state=1,ifweapon=0,VAREQUAL=0:state=15,setframe=55
:state=2:followplr
:state=2,plrcanbeseen:state=1
:state=5,random=1:state=6,setframe=54
:state=5:state=7,setframe=53
:state=6:incframe=54,strafe=90,rotatetoplr
:state=1,ifweapon=0,VARGREATER=0:state=10,setframe=56
:state=1,ifweapon=0,VAREQUAL=0:state=15,setframe=55
:state=6,plringunsight=1:useweapon
:state=6,frameatend=54:state=1,animate=51
:state=7:incframe=53,strafe=-90,rotatetoplr
:state=1,ifweapon=0,VARGREATER=0:state=10,setframe=56
:state=1,ifweapon=0,VAREQUAL=0:state=15,setframe=55
:state=7,plringunsight=1:useweapon
:state=7,frameatend=53:state=1,animate=51
:state=10:incframe=56
:state=10,frameatend=56:animate=51,reloadweapon,state=1
:state=10:DECVAR=1
:state=15:plraddhealth=-500,sethealth=0
:state=0,varequal=0:localvar=1,setvar=1