hi guys
i want the enemy search for and attack player
because i make game horror and i looking for this script
i have 2 script but problem in animation when enemy attack me
1 :
;Artificial Intelligence Script
;Header
desc = Search for and attack plr (scary)
;Triggers
;//Start\\
:state=0:waypointstart,etimerstart,state=1
:state=1,plrdistwithin=600:music=audiobank\HorrorMusic\enemy_close.ogg,state=20
:state=1,plrcanbeseen:state=50
;if enemy search too long, he will destroy hisself
:etimergreater=15000:destroy
;///Found\\\
:state=20,plrcanbeseen:state=50
:state=20,plrcannotbeseen:state=40
;///Search\\\
:state=40,plrcannotbeseen,random=3:etimerstart
:state=40,plrcannotbeseen,random=3,etimergreater=30:rotateheadrandom=50
:state=40,plrcannotbeseen,random=3,etimergreater=40:pivotrandom=55,movefore=10,animate=2
:state=40,shotdamage=1:rotatetoplr
:state=40,noiseheard=60:rotatetoplr
:state=40:state=20
;//ATTACK\\
:state=50,plrcanbeseen,plrdistfurther=50:settarget,music=audiobank\HorrorMusic\enemy_att.ogg,loopsound=audiobank\HorrorMusic\enemy_seeu.ogg,state=51
:state=50,plrcannotbeseen:stopsound
:state=51,plrdistfurther=50:movetotarget=1,animate=5
:state=51,plrdistwithin=50:rotatetoplr,animate=6,plraddhealth=-10
:state=51,losetarget=100,plrdistfurther=100,plrcannotbeseen:stopsound,music=audiobank\HorrorMusic\enemy_search.ogg,state=20
;End of Script ]
:waypointstate=0:animate=2,waypointstart
:waypointstate=3:animate=2,waypointnext
:waypointstate=4:animate=2,waypointrandom
:waypointstate=5:animate=2,waypointreverse
:activated=2:waypointstop,settargetname=NAME OF YOUR REMOTE CONTROL ENTITY,state=2
:state=2:rotatetotarget
:state=2:animate=2,movefore=1
:state=0,plrdistwithin=300:waypointstop,state=1
:state=1,plrdistfurther=40:rotatetoplr,movefore=2,animate=2
:state=1,plrdistfurther=300:animate=1,state=0
:state=1,plrdistwithin=40,rateoffire:rotateplr,animate=92,plraddhealth-20
if you have script different please paste here
help me pls