How do I create an air jump?

1 favourites
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • Greetings,

    I have been struggling for some time now trying to make my character perform an "air jump" consistently.

    See below for the attached project.

    Here is what I crave to achieve.

    -A normal single platform jump (single jump when standing on a solid).

    -No double jump.

    -when the character walks off of a platform he is able to perform a single jump in the air.

    -Consistency when running off the platforms and pressing jump.

    I can get the above to work, but it only works 90% of the time.

    Sometimes when you run off of the platform and you press jump the character doesn't jump. just falls.

    you just have to keep running off the edge and pressing jump over and over and eventually, he won't jump. Game breaking.

    I have successfully gotten this to work using the Y vector to "jump" but this creates strange clippings when colliding with moving solids.

    https://www.dropbox.com/sh/fdda8re4kx4cxjb/AAC5gDKvNd-g3E6bPZ_UFp04a?dl=0

  • make a variable on him and call it _jump lets say

    then if jump is 0 he can jump.

    if he is jumping set the value to 1

    when he lands reset the value back to 0.

    that should work, depends how you make him jump now, the above won't work mid air with the platform behavior default jump input. you will have to push player on Axes Y by some amount.

  • Thanks for the response Gamecorpstudio,

    I've tried what you've suggested but it yields the same falling "Glitch".

    Pushing the player on the Y axes would solve this problem but like I've said above

    it creates strange clippings when colliding with moving solids.

    This problem has plagued me for so long that I even subscribed to construct 3 hoping that would solve this problem but it seems I've just become desperate. Sigh. Well, that was a mistake.

  • i just tested your capx file on C2 on my end works good. doesn't do any glitches. it jumps mid air while falling 1 time. as it doesn't have a double jump yet implemented.

    i can't seem to replicate your collision with moving platform glitch. the collisions on my end is on point. what is your C2 version you are using? and what machine? it might not be the events or the game.

  • Same as gamecorpstudio it works for me perfect it didn't fail once the Jump

    About the "Solid Glitch" that you referring to, I think I know what it can be but first, can you Test this Capx see if the Glitch still happening for you?

    https://www.dropbox.com/s/7zqrx90oj901cle/Jump%20Bug2.capx?dl=0

  • -The strange clippings only happen when I change the Y vector in order to jump. As annoying as it is this is not the glitch, this is just how the game is designed and it won't be "fixed".

    -I'm ok with that as long as I can find another way to make my character jump 100% of the time in the air without it altering the Y vector.

    -Like I said your idea works 90% of the time. It's tedious, but eventually, when you press jump right at the edge of the platform he will fail to jump. - This is the "glitch".

    -Construct 2 Release 265(64bit).

    Same results on Construct 3.

    UserBenchmarks: Game 96%, Desk 89%, Work 66%

    CPU: Intel Core i7-6700K - 87%

    GPU: Nvidia GTX 980 Ti - 103.5%

    SSD: Crucial MX300 525GB - 87.8%

    HDD: WD Red 2TB (2012) - 74.6%

    RAM: Corsair Vengeance LED DDR4 3200 C16 2x8GB - 71.2%

    MBD: Gigabyte GA-Z170X-Gaming 6

  • Here is a video with an example of the jump failing.

    When the player is green that means that I pressed jump.

    As you can see in this video he falls even though he is green.

    Technically when he turns green he should jump even if he is on land or air.

    - Again, thank you guys for your help, very much appreciated.

  • Its something else then, the only thing I see similar to what you described its when it collides with the Left Moving Platform from the bottom corner or the edge close to the bottom which it doesn't Jump because it's a solid Platform and the Player has the Plataform behaviour so it registers the collision and doesn't let the Player Jump but that's how normally works by design to stop going through solids.

  • https://drive.google.com/open?id=16svPFOnIkgfJVqXW4ityIG54TtWsWISf

    Got to put it on youtube I take it?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok I just checked your video its something different then :) lol let me test again and see if I can replicate it

  • Oh, the link worked? sweet thanks.

  • Ok I test it quite long and is working 100% perfectly for me it didn't fail even once

    I recorded a small video:

    https://www.dropbox.com/s/13wewwn64w7i6g6/Jump%20Bug.mp4?dl=0

    Note: The one that fails is because my fault I didn't control it properly

    I apologise for the Mouse in middle disturbing I noticed after:)

    Have you ever Tested on different Pc? it may be your Keyboard failing, just a guess

  • I forgot to say I test it on C2 Version 265 if that helps

  • Interesting, from your video you seem to be pressing jump just a little too late.You have to press it on the very tip when you're about to fall. But you did do it right a few times. Ill test a different keyboard and computer altogether.

    Thanks for all the help, this gave me a spark of hope.

  • Interesting, from your video you seem to be pressing jump just a little too late.You have to press it on the very tip when you're about to fall. But you did do it right a few times. Ill test a different keyboard and computer altogether.

    Thanks for all the help, this gave me a spark of hope.

    :) :) Ok I missed that part, no worries I will Test it again

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