Double Jump Issues

thompsonjm22thompsonjm22 Member Posts: 15
edited January 2012 in Working with GS (Mac)
I'm working on creating a unique type of platformer. I'm having issues with my player being able to "Double Jump". Essentially, I have been using the code from the basic platformer in GameSalad. (I'm a new user) I have my code checking if the player is grounded and if his linear velocity is at 0. However, when I test to see if it works, I can continually press my jump key and see him jump further and further up even though he is not grounded.

Comments

  • POMPOM Member Posts: 2,599
    Hey ,
    i suggest you download this template :
    http://forums.gamesalad.com/discussion/38132/gs-tool-box-a-free-mega-template-ready-now/p1

    There are explanations on double jump there .

    Cheers
    Roy.
  • poopdecksweeperpoopdecksweeper Member Posts: 180
    Then make a rule stating that if the player's y position on jump > distance in Y then change attribute: grounded to false.

  • JakeMorJakeMor Member, PRO Posts: 136
    Hey guys, here's how I just did it in the game i'm working on:

    Attributes:
    Jump # (integer set to 0)
    Jump (boolean set false)

    Rules:
    1) When touch is inside button:
    - Change attribute Jump to TRUE
    - After .1 seconds change attribute Jump to FALSE
    2) When JUMP # < 2 AND when JUMP = TRUE:
    - Change Linear Velocity Y to 100
    - Change (Jump #) to (Jump # + 1)
    3) When overlaps/collides with floor:
    - Change jump # to 0


    Any easier ways?
    Jake

Sign In or Register to comment.