Hey all, I've edited the mob zombie script to include waypoints so that the enemies can follow them then run toward the player. They do follow they waypoints correctly and run toward the player correctly (for the most part).
However there is always one enemy who just stands there until shot (there are only 4 enemies on the map at any given time). The second problem that did not occur until I edited this coding is that when shot, the injured zombie (any of them, not just the still one) seems to almost always retreat, possibly towards a waypoint.
desc = Random Melee Attack
;Triggers
;RUNNING WAYPOINTS
:waypointstate=0:animate=94,waypointstart
:waypointstate=3:animate=94,waypointnext
:waypointstate=4:animate=94,waypointrandom
:waypointstate=5:animate=1,waypointstop
:state=0:animate=5
;DETECT PLAYER AND IDLE
:state=0,plrdistfurther=50000:animate=94, camshake=10
:state=0,plrdistwithin=1000,plrcanbeseen:state=5,rotatetoplr
;CHOOSE MELEE ATTACK & RUN OR WALK
:state=5,random=6:state=11
:state=5,random=6:state=66
:state=5,random=6:state=12
:state=5,random=6:state=6
:state=5,random=6:state=13
:state=5,random=6:state=1
;MELEE ATTACK 1 (DOUBLE ARM SLASH)
:state=1,plrdistfurther=60:rotatetoplr,runfore=10,animate=92
:state=1,plrdistwithin=60:rotatetoplr,setframe=98,state=7
:state=7,framebeyond=98 40,plrdistwithin=60:plraddhealth=-10,sound=audiobank\music\generic\silence.ogg,state=8
:state=7:incframe=98,rotatetoplr
:state=7,frameatend=98:state=5
:state=8,framebeyond=98 60,plrdistwithin=60:plraddhealth=-5,sound=audiobank\music\generic\silence.ogg,state=9
:state=8:incframe=98
:state=8,frameatend=98:state=5
:state=9:incframe=98
:state=9,frameatend=98:state=5
;MELEE ATTACK 2 (OVERHEAD SLASH RIGHT)
:state=6,plrdistfurther=60:rotatetoplr,runfore=10,animate=92
:state=6,plrdistwithin=60:rotatetoplr,setframe=101,state=2
:state=2,framebeyond=101 60,plrdistwithin=60:plraddhealth=-10,sound=audiobank\music\generic\silence.ogg,state=3
:state=2:incframe=101,rotatetoplr
:state=2,frameatend=101:state=5
:state=3:incframe=101
:state=3,frameatend=101:state=5
;MELEE ATTACK 3 (SINGLE ARM SLASH)
:state=66,plrdistfurther=60:rotatetoplr,runfore=10,animate=92
:state=66,plrdistwithin=60:rotatetoplr,setframe=99,state=22
:state=22,framebeyond=99 50,plrdistwithin=60:plraddhealth=-10,sound=audiobank\music\generic\silence.ogg,state=33
:state=22:incframe=99,rotatetoplr
:state=22,frameatend=99:state=5
:state=33:incframe=99
:state=33,frameatend=99:state=5
;MELEE ATTACK 4 (OVERHEAD SLASH LEFT)
:state=11,plrdistfurther=60:rotatetoplr,runfore=10,animate=92
:state=11,plrdistwithin=60:rotatetoplr,setframe=100,state=77
:state=77,framebeyond=100 60,plrdistwithin=60:plraddhealth=-10,sound=audiobank\music\generic\silence.ogg,state=88
:state=77:incframe=100,rotatetoplr
:state=77,frameatend=100:state=5
:state=88:incframe=100
:state=88,frameatend=100:state=5
;RAGE ANIMATION 1
:state=12,plrdistfurther=60:rotatetoplr,runfore=10,animate=92
:state=12,plrdistwithin=60:rotatetoplr,setframe=102,state=78
:state=78,framebeyond=102 40,plrdistwithin=16:sound=audiobank\music\generic\silence.ogg,state=89
:state=78:incframe=102,rotatetoplr
:state=78,frameatend=102:state=5
:state=89:incframe=102
:state=89,frameatend=102:state=5
;RAGE ANIMATION 2
:state=13,plrdistfurther=60:rotatetoplr,runfore=10,animate=92
:state=13,plrdistwithin=60:rotatetoplr,setframe=103,state=79
:state=79,framebeyond=103 40,plrdistwithin=16:sound=audiobank\music\generic\silence.ogg,state=90
:state=79:incframe=103,rotatetoplr
:state=79,frameatend=103:state=5
:state=90:incframe=103
:state=90,frameatend=103:state=5
I have looked through this code and can't seem to find what I did wrong to make said problems occur. Hopefully some more knowledgeable than I coders can look at this.