Moving specific distances

TboneTbone Member Posts: 49
edited November -1 in Working with GS (Mac)
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?

Comments

  • firemaplegamesfiremaplegames Member Posts: 3,211
    You can use my snapping to a grid demo:
    http://gamesalad.com/game/play/30842

    to get the grid position the actor should be snapping to..
    It might be a good start.
  • TboneTbone Member Posts: 49
    Had a look at that demo but isn't really what Im looking for, however it did give me some ideas.

    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.
Sign In or Register to comment.