Best solution for jumping in air?

0 favourites
  • 4 posts
From the Asset Store
Best car suspension with spring effect and very cool terrain generation.
  • Hi there!

    I want the player to be able to jump shortly after leaving the solid objects (or Jumpthru) instead of falling down. I have tried a bunch of different solutions and they all work but they all have issues as well. Is there a perfect solution for this?

    I hope you understand what I'm trying to explain.

    Thanks in advance,

    Tommy

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just to clarify, is what you want for the character to jump every time it leaves the ground, no matter what the reason for it was?

    If this isn't correct, under what circumstances should they jump?

  • Enternode - First of all, thanks for trying to help me out. I want to make it a little bit easier to play the game so if you press the jump-button a little too late, the players still jumps. If you don't want to jump then the player should just fall down.

  • A solution you may want to try is to store an "in air" timer as either a global variable or an instance variable of the player sprite (I recommend the latter). Have one event test if the player is in the air, and if so, increment it by one (via the Is On Floor condition, just invert it), and if not, set it to zero. If the player presses the jump key while the sprite is in the air, and the timer is below a certain value, have the player jump.

    What you may also do is to enable double-jumping, and then use the Reset Double Jump action to disable it after the player was in the air for long enough. That way, you can just use the built in jump command, as simply using simulate control while the user is in the air won't work with double-jump off.

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