So yeah in my attached level, I have 3 entities that pace back and forth and should start shooting/moving towards me when he hears something, gets shot, or sees the player. There's also a sniping entity that is exhibiting strange behavior.
Also, the monster by the teleporter is always by the wall and I want him to stay where he is until he actually sees the player.
Any help is appreciated!
Here's the code for paceTzap.fpi:
;Artificial Intelligence Script
;Header
desc = Pace Waypoints, If See Player shouts, Rotate And Shoot
;Triggers
:waypointstate=0:animate=2,waypointstart
:waypointstate=3:animate=2,waypointnext
:waypointstate=4:animate=2,waypointrandom
:waypointstate=5:animate=2,waypointreverse
:state=0:state=1
:state=1,plrcanbeseen:settarget,state=2,plrsound=audiobank\voices\taunt.wav
:state=1,plrdistwithin=10:settarget,state=2,plrsound=audiobank\voices\taunt.wav
:state=1,shotdamage=1:settarget,animate=1,rotatetotarget,resethead,state=2
:state=1,noiseheard=1:settarget,animate=1,rotatetotarget,resethead,state=2
:state=2:rotatetoplr,state=3,shootplr,waypointstop
:state=3:animate=1,state=1
;End of Script
Here's the code for shootway.fpi
;Artificial Intelligence Script
;Header
desc = Look and Shoot
;Triggers
:state=0,plrcanbeseen:state=1,settarget
:state=0:runfpidefault=1
:state=0,waypointstate=0:animate=2,waypointstart
:state=0,waypointstate=3:animate=2,waypointnext
:state=0,waypointstate=4:animate=2,waypointrandom
:state=0,waypointstate=5:animate=2,waypointreverse
:plrcannotbeseen,plrdistfurther=150:state=0,waypointstart,animate=2
:state=1:rotatetoplr
:state=1,plrcanbeseen:settarget
:state=1,plrdistfurther=100,plrelevwithin=10,random=15,rateoffire:movetotarget=1,animate=5,useweapon
:state=1,plrdistfurther=100,plrelevwithin=10,random=1:movetotarget=1,animate=5
:state=1,plrdistwithin=101:rotatetoplr
:state=1,plrdistwithin=50,random=50,rateoffire:useweapon
:state=1,ifweapon=1,plrdistwithin=101,plrcanbeseen=46,plringunsight,rateoffire:animate=1,rotatetoplr,freeze,useweapon,rundecal=6
:state=1,ifweapon=0:animate=1,state=2,setframe=6
:state=2:incframe=6
:state=2,frameatend=6:state=1,reloadweapon,sound=audiobank\guns\reload.wav
;End of Script
And in case you don't have it, meleebite.fpi:
desc = Melee Follow and Attack
;Triggers
:state=0,plrdistwithin=500:state=1
:state=1,plrdistfurther=90:rotatetoplr,movefore=2,animate=2
:state=1,plrdistfurther=500:animate=1,state=0
:state=1,plrdistwithin=90,rateoffire:rotatetoplr,setframe=8,state=2
:state=2,framebeyond=8 60,plrdistwithin=100:plraddhealth=-10,sound=audiobank\misc\bite.wav,state=3
:state=2:incframe=8,rotatetoplr
:state=2,frameatend=8:state=1
:state=3:incframe=8
:state=3,frameatend=8:state=1