Jump Restrictions

EthanZarovEthanZarov Member Posts: 156
edited June 2012 in Working with GS (Mac)
Hey, so my game is somewhat of a platformerish game. My jumping is this:
When game.jump = true
Timer
For 2.5 Seconds-
Change Attribute
Self.Linear Motion.Y to 700

It will jump, however you can click it as many times as you want and it will continue to jump, how do I make it so the character can only jump once until it hits the ground again.

Best Answer

  • jamie_cjamie_c ImagineLabs.rocks Posts: 5,772
    Accepted Answer
    I would update your rule so that it only allows your player to jump when it is touching one of your platforms.

    Rule:

    Actor receives event - overlaps or collides - with - actor of type - platform

    and

    When game.jump = true


    The behaviors in the rule:

    Timer
    For 2.5 Seconds-
    Change Attribute
    Self.Linear Motion.Y to 700


    Hope that helps.
    Jamie

Answers

Sign In or Register to comment.