ID:148788
 
Ok what i am trying to do is to create a proc which will replace walk_to and basically change the movement to pixel based. So far i have made walk_rand and now i cant figure out what i should do for walk_to. Here is my code, i am trying to check whether the person has walked far enough and which way he has to go.

mob
proc
walk_to2(M as mob)
var/gone = get_dist(src,M)
if(gone == 1)
return
var/direct = get_dir(src,M)
if(direct == "NORTH")
pixel_move(src,0,4)
if(direct == "SOUTH")
pixel_move(src,0,-4)
if(direct == "EAST")
pixel_move(src,4,0)
if(direct == "SOUTHEAST")
pixel_move(src,4,-4)
if(direct == 2)
pixel_move(src,4,4)
sleep(1)
walk_to2()
Try using get_step_to() or whatever, then get direction from the location to there.