Ladder problem

0 favourites
  • 4 posts
From the Asset Store
snake and ladder game with two characters: turtle and rabbit!
  • Hello guys, I have a problem with my ladder code.

    I use a collision (sprite) to detect when the character can climb, and it works fine.

    the problem comes when I try to duplicate this collision in order to have more ladders in the scenary, how the character when climbs match his X to the collision X, whatever ladder I try to climb the character moves to the original one.

    I appreciate any idea.

  • Add an instance variable to keep track of the state of the character, isClimbing or not, that you can check. If not climbing, then move onto the ladder and set the variable. If already climbing, then don't.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hello oosyrag thank you for your response, actually I have a instance variable to detect when the character climbs. I attached a image to ilustrate my problem.

    when I push up key near the ladder, the character match his X with ladder X to make sure the sprite is center with the ladder, like in figure A.

    The problem is, when I duplicate this ladder, whatever ladder I try to climb, the character match his X with the original ladder X.

  • Hello oosyrag, finally I think I catch what you said, I moved the character x to match the ladder when isclimb and it's works, thanks a lot!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)