Infinite Jump problem

TopoftheTempleTopoftheTemple Member Posts: 6
edited August 2012 in Working with GS (Mac)
I have a jump mechanic, complete with a jump button, but players can keep pressing the button and jumping as many times as they want, in essence creating an infinite jump. I put a wall to prevent the actor from going off screen, but if anyone has a smoother method for a jump mechanic, any help would be much appreciated.

Thanks.

Answers

  • LumpAppsLumpApps Member Posts: 2,881
    Ad an attribute called grounded.
    Then ad a rule:
    When actor collides with a ground platform
    Grounded is true
    otherwise
    grounded is false.

    Then on your jump rule:
    when all conditions are vallid
    ad a condition: when grounded is true.
    and a condition when self.motion.lineair velocity.Y is 0


    I got this from the platform template in the creator.
    Good luck!
  • gamewizard99gamewizard99 Member, PRO Posts: 67
    You could just do the following;
    Every 5 seconds,
    if (jump button) pressed,
    move up.
  • PhoticsPhotics Member Posts: 4,172
    For platformers, I like to use invisible actors that are constrained relative to the main actor... one below, one to the left and one to the right. So, jumps — including wall jumping — only occur when the sensor actors detect a "solid" object.
Sign In or Register to comment.