How do I make my player jump WITHOUT the platform behavior?

0 favourites
  • 3 posts
From the Asset Store
Players follower. use it for anything which follows the player
  • I'm trying to make my player jump using the Physics behavior instead of the Platform behavior because applying that behavior to the character doesn't allow my game to function how it's supposed to. I made it so that every time you press the space bar, it launches the player up, but this allows the player to have infinite jumps, any way to fix this so that they can't fly? Thanks!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You can give the player an instance variable, such as a boolean that is either true or false. Call it something like onFloor.

    If you press spacebar, set it false. If player collides with floor, set to true. If player walks off floor without jumping, set it false. You'd also check to see if onFloor is true to determine whether to allow player to jump. You'd also need to implement some events to check whether player overlaps with floor, so that you can set variable true or false.

  • You can give the player an instance variable, such as a boolean that is either true or false. Call it something like onFloor.

    If you press spacebar, set it false. If player collides with floor, set to true. If player walks off floor without jumping, set it false. You'd also check to see if onFloor is true to determine whether to allow player to jump. You'd also need to implement some events to check whether player overlaps with floor, so that you can set variable true or false.

    Thanks so much! It worked perfectly.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)