How would I make a charged jump?

I’ve already tried many different ways to get this to work but they don’t work. I’d appreciate if someone could point me in the right way.

Could you explain what you mean by charged jump? I assume it means that the jump height is influenced by some factor, but which one is it?

Do you mean a player should hold a jump button to define a strength of the jump? So you should make a jump to be dependent on any number variable. After this you can make an event like “when a button is pressed the variable +1”. It makes this variable to add +1 every frame.

Yes, by charged jump I mean holding down the jump button will make you jump higher. I’ve tried using variables but I most likely just implemented it wrong, I’ll keep that idea in my mind, thanks!

I’m going on the assumption you are using a platformer character behaviour.

Create an event with the conditions <jump> key pressed/held down and Trigger Once. In the action, reset/start a scene timer (say called “JumpChargeTimer”)

Then create another event with condition <jump> key is released, and in the action change your jump settings (gravity, jump speed or jump sustain time) based on the value of the timer, and simulate the jump key pressed.

Hey, i’m late replying but could you provide more informations about the last action ?
“and in the action change your jump settings (gravity, jump speed or jump sustain time) based on the value of the timer, and simulate the jump key pressed.”
Thanks :slight_smile:

I guess, you only have to change this property to a greater value.

No, I think he wanted to do a jump like Mario, the more you press the more you go higher
Jump sustain time allow you to « float » only

What do you mean by “float”?
The sustain time property does allow to jump higher. You can check the trajectory with this example:

Well, i’ll look at this, bc on my projeft when I add a sustain time, its the Time it stays at his higher jump point before falling