Thx corno, that really helped!
It works!
Kudos to you man. Just one problem. I cant get him to destroy after searching for long enough.
Here's my script
;Artificial Intelligence Script
;Header
desc = Search for and attack plr (scary)
;Triggers
;//Start\\
:state=0,plrdistfurther=601:state=0
:state=0,plrdistwithin=600:music=audiobank\HorrorMusic\enemy_close.ogg,state=20
:state=1,plrcanbeseen:state=50
;//Start2\\
:state=2:waypointstart,etimerstart
:state=2,plrdistfurther=601:state=0
:state=2,plrdistwithin=600,plrcannotbeseen:state=42
:state=3,plrcanbeseen:state=50
;///Found\\\
:state=20,plrcanbeseen:state=50
:state=20,plrcannotbeseen:state=40
;///Search\\\
:state=40,plrcannotbeseen,random=3:timerstart
:state=40,plrcannotbeseen,random=3,timergreater=30:rotateheadrandom=50
:state=40,plrcannotbeseen,random=3,timergreater=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