Moving one tile/grid

With my game I try to achieve a gameboard effect where your object moves a certain amount of tiles. I tried something with +y or +x position, although I didn’t really knew what it did and as my object dissapeared I’m not quite sure if its the right thing. Please answer!

The position behavior node has a “pixels” or “grid” option. You can set it to “grid” if you want to move to a specific space. The grid coordinates show in the editor when you mouse over each tile - 0,0 is the top left corner of your game.

If you decide to use pixels instead, you only have to remember that each grid cell is 32x32 pixels, so position 32,32 is the same as grid position 1,1

Hope this helps :slight_smile:

The +x and +y only currently work with pixels, and the grid won’t work.

If you want to use the grid, use multiples of 32

thank you very much it was very helpfull!!!

Is it possible to ask if it is a multiple of 32 using the filter function?

You can divide it by itself or 32 with an expression… Does that even work?

Im not sure if you can divide with expressions

You can divide with expressions, here is an example: http://flowlab.io/game/play/397581

Also @jngthree - I just deployed a fix for the position not incrementing correctly when using grid instead of pixels, thanks for posting that.