frenchpapa First off...
Quote: "how do you use code snippet?"
Click at top the "code\misc. code" button, PASTE your code, then click "code\misc. code" AGAIN (that closes it) Same goes for quotes.
As for the script, appears to be from "viral outbreak" so I can't test it. But try this.
Quote: "im wanting it to walk a waypoint"
In your "scriptbank\people" folder you'll see a script called "follow" it makes a character follow a waypoint.
:waypointstate=0:animate=2,waypointstart
:waypointstate=3:animate=2,waypointnext
:waypointstate=4:animate=2,waypointrandom
:waypointstate=5:animate=2,waypointreverse
Paste this into at the top of your script.
Now to get it to stop if player is heard and chase you. Remember your other thread with "noiseheard=x" ?
At the top of your script get rid (delete) of the first two "state=0 lines, keep the last (bottom one) .
Replace "plrdistwithin=250,plrcanbeseen" with "noiseheard=x" X being the distance in segments to noise.
I'll use 300 for three segments distance.
Should look like this...
:waypointstate=0:animate=2,waypointstart
:waypointstate=3:animate=2,waypointnext
:waypointstate=4:animate=2,waypointrandom
:waypointstate=5:animate=2,waypointreverse
:healthless=150:state=15,suspend,coloff,ragdoll,sound=audiobank\viral_outbreak\jaws_rage.wav
:state=0,noiseheard=300:waypointstop,state=5,rotatetoplr,sound=audiobank\viral_outbreak\jaws_intro.wav
Keep the rest the same. The whole code should look like this...
:waypointstate=0:animate=2,waypointstart
:waypointstate=3:animate=2,waypointnext
:waypointstate=4:animate=2,waypointrandom
:waypointstate=5:animate=2,waypointreverse
:healthless=150:state=15,suspend,coloff,ragdoll,sound=audiobank\viral_outbreak\jaws_rage.wav
:state=0,noiseheard=300:waypointstop,state=5,rotatetoplr,sound=audiobank\viral_outbreak\jaws_intro.wav
;CHOOSE MELEE ATTACK ROUTINE
:state=5,random=6:state=1
:state=5,random=6:state=6
:state=5,random=6:state=12
;MELEE ATTACK 1 (DOUBLE SLASH ATTACK/WALKING)
:state=1,plrdistfurther=65:rotatetoplr,runfore=10,animate=94
:state=1,plrdistwithin=65:rotatetoplr,setframe=95,state=7
:state=7,framebeyond=95 40,plrdistwithin=70:plraddhealth=-5,sound=audiobank\viral_outbreak\jaws_bite.wav,state=8
:state=7:incframe=95,rotatetoplr
:state=7,frameatend=95:state=5,sound=audiobank\viral_outbreak\jaws_intro.wav
:state=8,framebeyond=95 60,plrdistwithin=60:plraddhealth=-2,sound=audiobank\misc\melee.wav,state=9
:state=8:incframe=95
:state=8,frameatend=95:state=5
:state=9:incframe=95
:state=9,frameatend=95:state=5
;MELEE ATTACK 2 (SINGLE SLASH/RUNNING)
:state=6,plrdistfurther=65:rotatetoplr,runfore=10,animate=94
:state=6,plrdistwithin=65:rotatetoplr,setframe=96,state=2
:state=2,framebeyond=96 50,plrdistwithin=70:plraddhealth=-5,sound=audiobank\viral_outbreak\jaws_bite.wav,state=3
:state=2:incframe=96,rotatetoplr
:state=2,frameatend=96:state=5,sound=audiobank\viral_outbreak\jaws_intro.wav
:state=3:incframe=96
:state=3,frameatend=96:state=5
;RAGE ANIMATION/WALK CYCLE
:state=12,plrdistfurther=65:rotatetoplr,runfore=10,animate=94
:state=12,plrdistwithin=65:rotatetoplr,setframe=97,state=78
:state=78,framebeyond=97 20,plrdistwithin=160:sound=audiobank\viral_outbreak\jaws_awaken.wav,state=89
:state=78:incframe=97,rotatetoplr
:state=78,frameatend=97:state=5,sound=audiobank\viral_outbreak\jaws_intro.wav
:state=89:incframe=97
:state=89,frameatend=97:state=5,sound=audiobank\viral_outbreak\jaws_intro.wav
Try this and see if it "breaks" waypoints after hearing noise and chases you.
Now there's two problems with this, first these are customs characters.
In the waypoints "animate=2" I dont know if that's a walking animation or something else?
Second...
Quote: "if the player gets far enough it stops and continues it waypoint"
I'm gonna have to think about this one. What if the waypoints are to far away to return to?
I'm not sure about this one. Give me a day to come up with something.
My games never have bugs. They just develop random features..
Lots and lots of random features...