while (1)
walk_rand(src,10)
sleep(10)
Problem description: I use the above code to make an npc move randomly, which works fine except it also moves diagonnaly (and its movement state has #4 Dirs wtf?) while I'd want to make it move only up/down/left/right. How can I fix this?
But if you actually wanted to duplicate walking behavior yourself, which will keep walking randomly without you having to tell it to loop:
Now just call rand_walk.Start() to start moving a mob randomly.
And just set mover to null to stop random walking.