Moving specific distances
Tbone
Member Posts: 49
My game area is a grid 32 x 32. i want to move my actor only in increments on the grid either X or Y. I can do this with move to but its jerky. I want to use an expression, perhaps with a velocity control but I cant figure out how to make the actor stop on the exact grid position. I've kind of got it but if I press too quickly the actor loses its grid reference and ends up stopping out of place.
Does this make sense?
Does this make sense?
Comments
http://gamesalad.com/game/play/30842
to get the grid position the actor should be snapping to..
It might be a good start.
I've ended up using the MOD function to determine if my actor position is on grid and a bunch of rules to animate depending on direction and its all working great.
Took me all morning to figure this one out but got there in the end. Im a designer not a coder so this stuff stretches me a bit but none the less a fun challenge.
Cheers for pointing me in the right direction again.