Jumping

AadeeAadee Member Posts: 24

Hey I've made this whole platformer game where you can move around and jump and do everything. The only thing is that when I jump it can jump more than once. I set my jump button to 'w' and even while im in mid air I can hit 'w' again and i'll double jump. So I can do like 50 jumps without touching the ground, I can fly. I was wondering how I can make it so it's just one jump and I have to wait till I hit the platform to jump again or how to double jump....either way would really help.

Thank you!

Comments

  • Twayne2Twayne2 Member Posts: 458
    edited March 2020

    To do this, create an attribute. Do you know what that is? Also, which Creator are you using? An attribute is like a variable, you can assign it values. I am gonna reference you to a video that you can watch (it's how I first learned):

    Once you understand attributes, you can create a boolean to switch between true and false for jumping triggered or not, or as I do, use integers to switch from 0 to 1 and then back to 0. See, the concept involves saying if you press space, jump and change jump count to 1. Whenever you are touching the ground change jump count to 0. Or at least that's what I'm thinking right now. :smile:

  • AadeeAadee Member Posts: 24

    @Twayne2 said:
    To do this, create an attribute. Do you know what that is? Also, which Creator are you using? An attribute is like a variable, you can assign it values. I am gonna reference you to a video that you can watch (it's how I first learned):

    Once you understand attributes, you can create a boolean to switch between true and false for jumping triggered or not, or as I do, use integers to switch from 0 to 1 and then back to 0. See, the concept involves saying if you press space, jump and change jump count to 1. Whenever you are touching the ground change jump count to 0. Or at least that's what I'm thinking right now. :smile:

    Thank you so much for the help! :smiley:

  • Twayne2Twayne2 Member Posts: 458

    :grin:

Sign In or Register to comment.