Now the on-topic part of this post. ;)
I've run into the problem where, using the *_towards functions, the barmaid will keep walking into anything between her and the customer mob. I have an idea for a "smarter" moveto() proc, but I want to make sure there isn't any error-checking in step. From my understanding, it works as such if rewritten in DM
proc myWalk_towards(target as mob){
//assume .loc is a property to return
//a named list of ("X"=x coord, "Y"=y coord)
var mylocx=src.loc("X")
var targlocx=target.loc("X")
var mylocy=src.loc("Y")
var targlocy=target.loc("Y")
// get X/Y difference.
var xdiff = mylocx - targlocx
var ydiff = mylocy - targlocy
if (abs(xdiff) > (abs(ydiff))
if (xdiff > 0)
src.south()
if (xdiff < 0)
src.north()
if (abs(ydiff) > abs(xdiff))
if (ydiff > 0)
src.west()
if (ydiff < 0)
src.east()
Is there anything else to the walk_towards() function