FPM attached..
the idea is to give 2 warnings upon approaching a area. then if you don't leave to blast away at you.
current code stripped trying to get it to work.
;Artificial Intelligence Script
;Header
desc = follow waypoints,warnplayer twice then shoot or if shot or see shooting another or enter restricted area.
;Triggers
:losetarget=10:waypointstart
: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:hudreset,hudx=50,hudy=60,hudimagefine=gamecore/text/sorrysir.png,hudname=warni,hudmake=display,hudunshow=warni
:state=0:hudreset,hudx=50,hudy=70,hudimagefine=gamecore/text/i'llshoot.png,hudname=warnii,hudmake=display,hudunshow=warnii
:state=0:state=2
;:state=1,plrcanbeseen:settarget,state=2
:state=2,plrdistwithin=500:waypointstop
:state=2:state=3
;:state=3,plrdistwithin=500:rotatetoplr
:state=3,plrdistwithin=500:hudshow=warni,state=4
:state=4,plrdistfurther=100:hudfadeout=warni
:state=4:state=6,etimerstart
;:state=5,plrcanbeseen:rotatetoplr
:state=6,etimergreater=1000
:state=6:state=7
:state=7,plrdistwithin=500:hudshow=warnii
:state=7:state=8
:state=8,plrdistwithin=500,etimergreater=1500:rotatetoplr,hudfadeout=warnii
:state=8,plrdistwithin=500,etimergreater=2000:state=9
:state=9,etimergreater=2010,shotdamage=1:sethealth=900,shootplr
:state=9,plrdistwithin=500,etimergreater=2010:sethealth=900,shootplr
;:state=7:state=8
;;:state=4,plrdistfurther=900:animate=1,waypointstart,state=1
;:state=4,plrcanbeseen:rotatetoplr
THis is what i kinda worked up to start with,
;Artificial Intelligence Script
;Header
desc = follow waypoints,warnplayer twice then shoot or if shot or see shooting another or enter restricted area.
;Triggers
:losetarget=10:waypointstart
: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:hudreset,hudx=50,hudy=60,hudimagefine=gamecore/text/sorrysir.png,hudname=warni,hudmake=display,hudunshow=warni
:state=0:hudreset,hudx=50,hudy=70,hudimagefine=gamecore/text/i'llshoot.png,hudname=warnii,hudmake=display,hudunshow=warnii
:state=0:state=2
;:state=1,plrcanbeseen:settarget,state=2
:state=2,plrdistwithin=500:waypointstop
:state=2:state=3
;:state=3,plrdistwithin=500:rotatetoplr
:state=3,plrdistwithin=500:hudshow=warni,state=4
:state=4,plrdistfurther=100:hudfadeout=warni
:state=4:state=6,etimerstart
;:state=5,plrcanbeseen:rotatetoplr
:state=6,etimergreater=1000
:state=6:state=7
:state=7,plrdistwithin=500:hudshow=warnii
:state=7:state=8
:state=8,plrdistwithin=500,etimergreater=1500:rotatetoplr,hudfadeout=warnii
:state=8,plrdistwithin=500,etimergreater=2000:state=9
:state=9,etimergreater=2010,shotdamage=1:sethealth=900,shootplr
:state=9,plrdistwithin=500,etimergreater=2010:sethealth=900,shootplr
;:state=7:state=8
;;:state=4,plrdistfurther=900:animate=1,waypointstart,state=1
;:state=4,plrcanbeseen:rotatetoplr
currently what happens is both warnings display and he shoots at you..
I have turned the plrdistwithin=500,etimergreater=1500
and reversed it
etimergreater=1500,plrdistwithin=500
yet it makes no difference,,
as well as plrdistwithin=500 is not being honored at all.
the first working script state is
:state=2,plrdistwithin=500:waypointstop
yet the player is at a distance of 1000 or better and the character is not using the waypoints!
The script just runs through all states and tries to kill you.
The FPM runs from mapbank and the script is run from the scriptbank.
It has to be something I did that I am not seeing. please help.