Creations Favorites Medals Posts ID:157548
 ID:157548   Feb 16 2010, 9:35 am how to make a player walk 1/2 - 1/4 an tile [32 by 32 pixels]
 #1 Feb 16 2010, 10:12 am XnathanielX wrote: how to make a player walk 1/2 - 1/4 an tile [32 by 32 pixels] Are you trying to say you want to know how to develop Pixel Movement?
In response to Maximus_Alex2003 (#1)
I beleive what he is trying to do is change the size of the step you take on the map. Um I tried I couldn't figure it out.

 ```client pixel_x = 16 pixel_y = 16 pixel_z = 16 ```
 #3 Feb 16 2010, 11:53 am In response to Darkjohn66 (#2) Darkjohn66 wrote: I beleive what he is trying to do is change the size of the step you take on the map. quite right instead of walking 1 tile i wish to walk 1/2 a tile and such
 #4 Feb 16 2010, 12:15 pm pixel_x and pixel_y.
 #5 Feb 16 2010, 1:22 pm In response to Garthor (#4) Garthor wrote: pixel_x and pixel_y. I laugh at that minimalist response. No good will come from this.
 #6 Feb 17 2010, 2:56 am In response to Tubutas (#5) Tubutas wrote: Garthor wrote: pixel_x and pixel_y. I laugh at that minimalist response. No good will come from this. erm what?
In response to Darkjohn66 (#2)
Here is a basic demonstration, it would need editing to check for the worlds minimum and maximum x and y locations. As well as for pixel bumping, and many other things. Sorry if you don't understand it, because of the brackets and such. I'm posting this from my phone.

 ```client/North() pixel_movement(src.mob, NORTH)proc/pixel_movement(mob/m, direction) switch(direction) if(NORTH){m.pixel_y++; if(m.pixel_y >= 32){m.pixel_y = 0; m.y++}} if(SOUTH){m.pixel_y--; if(m.pixel_y <= 0){m.pixel_y = 32; m.y--}} if(EAST){m.pixel_x++; if(m.pixel_x >= 32){m.pixel_x = 0; m.x++}} if(WEST){m.pixel_x--; if(m.pixel_x <= 0){m.pixel_x = 32; m.x--}} ```

Also, it appears what you are trying to do is this.
 ```mob/pixel_step_size = 16 ```
 #8 Feb 17 2010, 6:26 am In response to Ulterior Motives (#7) Besides the above mentioned pixel movement, you could also mess around with world.icon_size variable. If you set that to 8, you could easily make your atoms move 8 pixels at a time, but the downside is that you would have to make anything that is larger than 8x8 pixels into a multi-tiled atom.
 #9 Feb 17 2010, 6:34 am In response to Gunbuddy13 (#8) ill do the 8 pixel style on another project but now ill forcus on studying the other style, thanks for your help ^.^