I don’t want to use any extensions. I want my player to come up when space is pressed, and continue to go up for a second or two, and then come down, but when I press SPACE, nothing happens. My events:
If Space pressed, add force at -90 degrees, with 50 speed to player. Start jump timer.
When jump timer reaches 2 seconds, end all forces.
But pressing SPACE does nothing, whatsoever. How do I make this work?
But I have made anyways the project that you were asking for step by step.
Firstly you will need the platformer character Behaviour, and in there you can change the max falling which is currently set on 1500 px* 1/s speed and Jump sustain time in seconds, which I have set it on 2s.
Secondly you will need to add this piece of code :
I’m confusing extensions and behaviors, I guess. They are extremely parallel. What I meant was, with only the default forces, rather than by using the platformer or even physics behaviors.
The other events don’t have any bounds, I don’t think. I’m pretty sure they don’t conflict with the ability to shoot up into the air, but if nothing else, here’s gravity.
Okay. That did it. But it shakes and refuses to jump unless you press the button again. Why might this be? I mean, it’s just great for a rocket, but not for a little person.
It is. The gravity is constantly affecting the player for as long as the player is not touching a platform. So I changed it slightly. If the player object variable jumping is false, then gravity works. If the timer for jumping is over, the force that throws the player upward is stopped, and the variable jumping is no longer true. If something is no longer true, then it is false. And the gravity force is activated then.