How can I make my character jump higher on longer keypress?

I’m looking to make my character jump higher on a longer keypress with a maximum height (let’s say after a second).

How do I accomplish this with blueprint?

Bonus Question: How do I add momentum to movement on the X/Y axis?

For both of these questions think something like mario.

Using blueprints and side scroller example content!

Thanks in advance for your help!

You could use an event tick into a gate that will be opened by pressing the jump button and closed by releasing the button or when the maximum jump length delay has finished.

I had no gravity enabled, so I made my own in the blueprint. But the gate part is what you would probably need I think.

Thanks for the reply! What are the names of the untitled nodes between the break and make vector nodes? I can’t find them in the editor.

Those are just float ± float nodes. Which just add an offset to the vector to move it up or down per tick.

There is a much easier way to do this. A variable jump height is built into the character movement and it literally only takes 30 seconds to turn it on.

This tutorial explains how to do it within the first 2 minutes: