ok well i've added on to my script and ran into the same problem again, here is the script
;Artificial Intelligence Script
;Header
desc = Advanced AI
:plralive=0:state=0
:state=0:animate=1,floorlogic
:state=0,noiseheard=400:rotatetoplr,state=1
:state=0,plrdistwithin=500:rotatetoplr,settarget,state=1
:state=0,plrcanbeseen:rotatetoplr,settarget,state=1
:state=0,shotdamage=1:rotatetoplr,settarget,state=1
:state=1,ifweapon=0:state=2,setframe=6
:state=1,ifweapon=1,plrcanbeseen,rateoffire:rotatetoplr,settarget,useweapon,rundecal=6
:state=1,ifweapon=1,plrdistwithin=500,rateoffire:rotatetoplr,settarget,useweapon,rundecal=6
:state=1,ifweapon=1,plrdistwithin=500,plrcannotbeseen:rotatetoplr,state=7
:state=1,ifweapon=1,plrdistfurther=850,plrcannotbeseen:state=5
:state=1,ifweapon=1,plrdistfurther=850,plrcanbeseen:state=7
:state=1,shotdamage=1,random=1:state=3,setframe=3
:state=1,shotdamage=1,random=2:state=4
:state=2:incframe=6
:state=2,frameatend=6:state=1,reloadweapon,sound=audiobank\guns\reload.wav
:state=3:incframe=3
:state=3,random=1:rotatetoplr,strafe=90,rotatetoplr
:state=3,random=1:rotatetoplr,strafe=-90,rotatetoplr
:state=3,frameatend=3:animate=1,state=1
:state=4:rotatetoplr,useweapon,state=1
:state=5,random=1:rotatey=65,state=6,setframe=2
:state=5,random=1:rotatey=-65,state=6,setframe=2
:state=5,plrcanbeseen:rotatetoplr,state=1
:state=5,plrdistwithin=500:rotatetoplr,state=1
:state=5,noiseheard=400:rotatetoplr,state=1
:state=5,shotdamage=1:rotatetoplr,state=1
:state=6:incframe=2
:state=6:movefore=8
:state=6,frameatend=2:animate=1,state=5
:state=6,plrcanbeseen:rotatetoplr,state=1
:state=6,plrdistwithin=500:rotatetoplr,state=1
:state=6,noiseheard=400:rotatetoplr,state=1
:state=6,shotdamage=1:rotatetoplr,state=1
:state=7:rotatetoplr,animate=2,followplr
:state=7,plrcannotbeseen:state=1
:state=7,plrdistwithin=500:rotatetoplr,state=1
:state=7,shotdamage=1:rotatetoplr,state=1
:plrdistfurther=10000:state=0
;End of Script