;Artificial Intelligence Script

;Header

desc          = Pace Waypoints, If See Player, Rotate And Shoot

;Triggers

:waypointstate=0:animate=2,waypointstart
:waypointstate=3:animate=2,waypointnext
:waypointstate=4:animate=2,waypointrandom
:waypointstate=5:animate=2,waypointreverse
:nearactivatable=0:settarget,activatetarget=2,animate=1,state=0

:state=0:state=1
:state=1,plrcanbeseen:settarget,state=2
:state=1,random=20:rotateheadrandom=65
:state=1,random=60:rotatetoplr
:state=1,shotdamage=10:settarget,animate=1,rotatetotarget,resethead,state=2
:state=1,noiseheard=5:settarget,rotatetotarget,rotatetoplr

:state=2:waypointstop,rotatetoplr,state=3,shootplr
:state=3:animate=1,state=1

;End of Script
