client
North()
if(usr.controlling) // controlling the object
for(var/obj/movable/O in get_step(usr,usr.dir)) //infront
step(O, NORTH) //move the object North a step instead of you
usr.controlling = 0 // reset controlling so you move again
return // return
else // if controlling has no value
..() // do regular North things
South()
if(usr.controlling)
for(var/obj/movable/O in get_step(usr,usr.dir))
step(O, SOUTH)
usr.controlling = 0
return
else
..()
East()
if(usr.controlling)
for(var/obj/movable/O in get_step(usr,usr.dir))
step(O, EAST)
usr.controlling = 0
return
else
..()
West()
if(usr.controlling)
for(var/obj/movable/O in get_step(usr,usr.dir))
step(O, WEST)
usr.controlling = 0
return
else
..()
By redefining each direction essentially you can control each direction individually and use them for moving the object infront of you each step at a time. But look at this:
client
Move()
if(usr.controlling)
for(var/obj/movable/O in get_step(usr,usr.dir))
step(O,)) // the second argument has to get the user's next direction
usr.controlling = 0
return
else
..() // do regular client/Move() things
Now what I'm trying to figure out is how I could make the second argument of the step proc get the users next movement direction as an argument so the object will move in the users next step direction instead of the user.
If all else fails what I've already done by redefining each movement proc individually will work but I'm just trying to simplify my code if it's possible.