;Artificial Intelligence Script
;Header
;desc = Test script
;Triggers
:waypointstate=0:animate=2,waypointstart
:waypointstate=3:animate=2,waypointnext
:waypointstate=4:animate=2,waypointrandom,state=0
:state=0,plrcanbeseen:state=1,settarget
:losetarget=10:runfpidefault=1
:state=0:runfpidefault=1
:state=1:rotatetoplr
:state=1,ifweapon=1,plrcanbeseen=46,plringunsight,rateoffire:useweapon,rundecal=6
:state=1,ifweapon=0:state=2,setframe=6
:state=2:incframe=6
:state=2,frameatend=6:state=1,reloadweapon,sound=audiobank\guns\reload.wav
:state=10:timerstart,state=11,animate=31
:state=11,timergreater=5000:state=0,animate=2,waypointstart
:state=11,random=5:rotateheadrandom=35
;End of Script
Another script by me that needs revising. The enemy follows waypoints to the player and then runs around freely and shoots at player. No reversing on the waypoints, just one way.