ID:167358
 
Does anyone know of a movement library or can give me a quick code or overview on how to make it so Players can go forward using Up, reverse using Down and turn (with the normal movement) using Left and Right?


I'm not looking for Pixel car movement. Its the tile based movement but different.
You can overwrite client/North,South etc. to do this kind of movement.

client
North()
step(mob, mob.dir) // step the direction the player is facing
South()
step(mob, turn(mob.dir, 180)) // step the opposite direction that the player is facing
East()
mob.dir = turn(mob.dir, 90) // turn clockwise 90 degrees or in any increment you want
West()
mob.dir = turn(mob.dir, -90)


~~> Unknown Person
In response to Unknown Person
I knew that, but I didn't think I had to use 360 and that.

Thanks.