Make an actor jumping two times?

GuaveMediaGuaveMedia Member, PRO Posts: 1,262
edited November -1 in Working with GS (Mac)
Hey everybody, in my first game my actor only could jump again when hiting the ground again, in my new game I want that he can jump twice and then only again when hiting the ground.

So to jump endless I just can say change velocity y to whatever..
To jump once only I just added an attribute..

But what in this case?

Thx

Comments

  • SnapFireSnapFire Member Posts: 361
    Ok, here's how you do it:

    1) Create a integer game atribute called Jump

    2) Make a rule: When Game.Jump = 1 OR Game.Jump is 2

    3) Put another rule inside the first one: When button or touch or whatever is pressed, then (however you want to make your actor jump behavior) AND change atribute Game.Jump to Game.Jump+1

    4) Make another rule on it's own: When Game.Jump = 3 AND actor overlaps with ground, then change atribute Game.Jump to 1

    That should create a good Double-Jump

    Good Luck
    -Thomas
Sign In or Register to comment.