ID:138310
 
Dantom-
Can you make it so once the walking object in these procs reaches its destination, the proc stops getting called? As it is, once you call walk_to, the object will keep walking there, and if something moves it away, it walks back.
For example, if you make it so the user can walk by clicking on turfs with
turf/Click()
walk_to(usr,src)
Once the usr is moved there, if something else causes him to move, he moves back to src.

I've tried using walk(usr,0) at all the points where the usr is moved, but it doesn't appear to be working all the time, and its generally a bad thing to have a proc we have little control over running constantly.

-AbyssDragon
On 11/11/00 1:43 pm AbyssDragon wrote:
I've tried using walk(usr,0) at all the points where the usr is moved, but it doesn't appear to be working all the time, and its generally a bad thing to have a proc we have little control over running constantly.


You might want to check out the Deadron library function, dd_StepTowards(), which gives you a lot of control over how the walking is handled.

Documentation at:

http://www.deadron.com/Games/BYOND_doc.html#N3388


The idea there is that you call dd_StepTowards() whenever you want to take a step, removing the hassle of not knowing what the mob is doing or whether it has stopped. You could also use the DM function for this, but dd_StepTowards() uses an A* pathing algorithm that will work no matter how large the map is and no matter what obstacles are between your mob and the destination.