ID:157070
 
Is it possible to move the mob's location by pixels?
Ishuri wrote:
Is it possible to move the mob's location by pixels?

If you mean about mob.loc then NO!(because pixel_offsets are purely visual effect!) There are certain demos, that support these, but they don't really support pixel collision(as far as I know).

But logically there is an explanation to change a mob's loc via changing its pixel.(I think its like if the pixel_x/pixel_y is offset by 32 or a any_value you set, then you can the x or y variables of the movable_atom.

// a small piece of crap
mob/proc/pix_NORTH()
src.pixel_x+=4 // move 4 pixel up but the loc is still same
if(src.pixel_x>=32)
src.pixel_x=0 // sets the offset to 0
src.x+=1 // adds a one to x_cordinate
//you might want to add some collision check procedure before adding a pixel so do it =P


But going through the demos is your best bet to get an idea.
In response to Soul Sign
Oh sweet thanks =D