I am not that good at scripting
I tried something but it isnt good...
This is the script:
desc = Shadow Hider
;Triggers
;WALKING WAYPOINTS
:state=0,plrdistwithin=300,plrcanbeseen:state=50,rotatetoplr,sound=audiobank\dungeonpack\shadow_hider_intro.wav
:waypointstate=0:animate=2,waypointstart
:waypointstate=3:animate=2,waypointnext
:waypointstate=4:animate=2,waypointrandom
:waypointstate=5:animate=2,waypointreverse
;DETECT PLAYER
:state=50,plrdistwithin=300:waypointstop,rotatetoplr,setframe=1,state=1
:state=50,plrdistwithin=200:waypointstop,state=3
:state=1:incframe=1
:state=1,frameatend=1:state=50
:state=1,plrdistfurther=300:waypointstop,rotatetoplr,animate=1,state=50
:state=1,plrdistwithin=200:waypointstop,animate=2,state=3
:state=1,plrdistwithin=500,inview=1:state=55
:state=55,plrdistwithin=500,idle=1:state=1
;Select Attack
;walk
:state=3,plrdistwithin=200:waypointstop,rotatetoplr,animate=3,movefore=1,state=3
:state=3,plrdistfurther=200:waypointstop,rotatetoplr,animate=1,state=0
:state=3,plrdistwithin=60:state=4
;Choose attack
:state=4,plrdistwithin=60,random=3:waypointstop,rotatetoplr,setframe=94,state=5
:state=4,plrdistwithin=45,random=3:waypointstop,rotatetoplr,setframe=95,state=7
:state=4,plrdistwithin=55,random=3:waypointstop,rotatetoplr,setframe=96,state=30
;attack1
:state=5,framebeyond=94 14,plrdistwithin=60:plraddhealth=-500,sound=audiobank\dungeonpack\shadow_hider_attack.wav,state=6
:state=5:incframe=94,rotatetoplr
:state=5,frameatend=94:animate=10,state=50
:state=6:incframe=94,rotatetoplr
:state=6,frameatend=94:animate=10,state=50
:state=6,plrdistfurther=200:waypointstop,rotatetoplr,state=50
;attack2
:state=7,framebeyond=95 14,plrdistwithin=45:plraddhealth=-500,sound=audiobank\dungeonpack\shadow_hider_attack.wav,state=8
:state=7:incframe=95,rotatetoplr
:state=7,frameatend=95:animate=10,state=50
:state=8:incframe=95,rotatetoplr
:state=8,frameatend=95:animate=10,state=50
:state=8,plrdistfurther=200:waypointstop,rotatetoplr,state=50
;attack3
:state=30,framebeyond=96 14,plrdistwithin=45:plraddhealth=-500,sound=audiobank\dungeonpack\shadow_hider_attack.wav,state=31
:state=30:incframe=96,rotatetoplr
:state=30,frameatend=96:animate=10,state=50
:state=31:incframe=96,rotatetoplr
:state=31,frameatend=96:animate=10,state=50
:state=31,plrdistfurther=200:waypointstop,rotatetoplr,state=50
and thats the original (I only added
:state=1,plrdistwithin=500,inview=1:state=55
:state=55,plrdistwithin=500,idle=1:state=1
)
so how could I make enemy idle when player look at him and when player turns around enemy runs for him. Please help...