(Re Post) Is there a way to make an actor move one space at a time when pushed?

rickynikorickyniko Member Posts: 85
edited November -1 in Working with GS (Mac)
Is there a way to make an actor move one space at a time when pushed? , the game im making involves the player pushing around crates to pass through the maze, i want it so that when a crate is pushed, to move one space.

Comments

  • JackBQuickJackBQuick Member Posts: 524
    I've created a demo for you here:

    Actor Pushing an Object (Demo)

    It sounds like you are trying to make a Sokoban-type game. This will be hard. I only used one object and I had the main actor examine the x- and y-coordinates of the object being moved so it is simple enough.

    I can't get my mind around how this will work with multiple crates. This will involve physics, I'm sure.

    Anybody else have any ideas?
  • ORBZORBZ Member Posts: 1,304
    You need to divide the screen up into a grid. Then snap the pushable objects to the intersecting points on the grid. I think FMG made an example of this on his profile. You should look there for an example on how to get started with the snap-to-grid feature. After that just use a little physics to "get the ball moving"
  • JackBQuickJackBQuick Member Posts: 524
    Good idea, ORBZ!

    @rickyniko - Here's firemaplegames's Dragging/Snapping demo.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi rickyniko, just poking my head round the doorframe:
    JackBQuick said:
    @rickyniko - Here's firemaplegames's Dragging/Snapping demo.

    Firemaplegames is excellent as always; I tried to do a similar thing a week or so ago; nowhere near!

    :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

Sign In or Register to comment.