ID:263157
 
Code:
client
West()
mob.dir = WEST
mob.pixel_x -= 5
East()
mob.dir = EAST
mob.pixel_x += 5
North()
mob.dir = NORTH
mob.pixel_y += 5
South()
mob.dir = SOUTH
mob.pixel_y -= 5


Problem description:
When it moves, it only moves the icon, not your camara. Also it makes it so you can walk threw density, any ideas?
Pixel offsets are graphical only. You have to actually move the object once the pixel offset reaches a sufficient amount.
atom/reallign()
while(pixel_x >= 32)
pixel_x -= 32
step(src, EAST)
while(pixel_x <= -32)
pixel_x += 32
step(src, WEST)
while(pixel_y >= 32)
pixel_x -= 32
step(src, NORTH)
while(pixel_y <= -32)
pixel_x += 32
step(src, SOUTH)

That's not the greatest way to go about it there, but it's the basic idea behind what you need to do.
In response to Loduwijk (#1)
Thankz, I now got it done, just one little bug where you go into a density object, but once you are threw the whole turf it just teleports you back to where you started, so it is good
In response to PoLaR XI (#2)
You should make a safety check, such as
for(var/atom/O in get_step(mob,mob.dir))
if(O.density) return 0


That's the basic idea >.> I am sure you can think of a better one <.<

- GhostAnime