Platformer Enhancements - Double Jump

6
  • 79 favourites

Index

Stats

13,262 visits, 36,288 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

7. Next we need to add another condition that checks to see if the player is hitting the up arrow. Basically our test now will be, is the player already jumping, and are they hitting the up arrow. These are the conditions that should trigger our double jump. Action: In the event sheet right click on the player is jumping condition that we created in the last step and then choose add another condition. This time double click the keyboard object. On the following screen click the "on key pressed" event (not the "Any Key Pressed") and then click Next.

8. Action: On the screen that comes up, click where it says "Click to Choose" (This will let us choose the key we are looking for). You will then see a smaller window pop up that allows you to push any key on the keyboard to select it. Press the Up Arrow key and then click OK and then click Done.

9. Now that we have our conditions to check if the player is jumping and the up arrow is pressed, we need to have an action to boost the player up higher in the air (our double jump). For this we will create an action that takes the character and adjusts their Y axis. This is their vertical position on the screen. Basically when they player does a double jump, we want to bump them up even higher than their normal jump. We do this by adjusting their Y axis (Vector Y) by a negative number. This is because in construct 2 negative numbers on the Y axis move you upwards. Action: On the Event sheet click on "Add Action" to the right of our "Up Arrow Pressed" event.

10. Action: On the Add Action screen double click the "Player" Object. Scroll down to Platform and double click the "Set Vector Y" button.

11. Action: In the parameters window that pops up there will be a text box that says Vector Y. Type -500 in the box. Note that there is no space between the - and the 500. Click Done.

  • 1 Comments

  • Order by
Want to leave a comment? Login or Register an account!
  • This is amazing, Thank you! This may help me with triggering the jump sound better. Right now my player can press jump and while in the air can continue to press jump and the sound will trigger. If I can trigger it on jump phase that would alleviate my issues I believe!