I am trying to create an ability in one of my games, where once you collect an orb, you have the ability to press a key on the keyboard to do a high jump.
I have the jump and run controls already, but I can’t figure out how to make a double-condition to check if you have collected the orb, and then if you are touching the ground, and pushing the keyboard key to do the high jump.
I have pictures of both the player and the orb’s behaviors. I started adding blocks, but I’m not sure if I’m on the right path.
This is sort of what I want, although I want it on a separate keyboard key. So up is regular jump any time (when touching the ground), but “V” is super jump after they collect the orb (and when they are on the ground)
Here is the game (and my mess of code because I was trying to do an add and subtract system to find when two conditions were true) http://flowlab.io/game/view/434764
If I understand you correctly, that’s just a minor tweak. You can use the up arrow as normal, and just have a switch that enables the “v” key when you collect the orb.