Jump sustain after killing an enemy

0 favourites
  • 9 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported
  • How do I get my character jumping higher if I hold jump button after killing an enemy?

    When my character kills an enemy, I set its vector Y to -something so it jumps again, but how do I get jump sustain to work as well so I can hold jump to jump higher from the enemy?

    Tagged:

  • I've been watching this question for the past 6 days to see if there was a good answer already out there that someone would point out. Since no one has chimed in yet and I couldn't find an answer doing a quick search, I decided to play with it myself. Here is a very simple sample project using the platform behaviors double jump action. It works really well and only uses a single event with 5 actions. The actions enable the double jump and set it available to use so it can be repeated. It then disables the double jump after .25 of a second so the player has that long to hit jump again to get the effect.

    drive.google.com/file/d/1vUgMBzsF04cnMqQtL9eoPzMW2cMEuiai/view

    It was fun to figure out and not too difficult to implement. I hope it gets you what you need and good luck with your project.

  • Thanks a million, really!

    But what if I already have double jump in my game???

  • Then you probably don't need the actions that enable and disable the double jump. Play with the example and see if you can get it to work with double jump already enabled.

    Again, this is a solution I found to solve the problem using the tools at hand. There are probably many ways to do it with no right answer. Just viable solutions. If this example doesn't work for you, I'm sorry.

    Good luck with your project.

  • But what if I kill the enemy after the second jump?

    Anyway, I won't use double jump, I was just wondering.

    Again, thanks a million, you really helped a lot!

  • The Double-jump behavior has an action called "Set Double Jump Allowed." I show it in the example I gave you. I tells the system to allow the player to jump again. It can be used to jump another time after a double jump has happened but before the player lands on the ground.

  • I tought This action would enable and disable the double jump as a behaviour, but ok then.

  • Sorry. I miss typed. The action is "Set Double Jump Allowed."

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No worries, thanks again then, very helpful

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