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

**URL:** <https://forums.unrealengine.com/t/how-can-i-make-my-character-jump-higher-on-longer-keypress/284246>\
**Category:** Character & Animation\
**Tags:** side-scroller, jump, unreal-engine, question\
**Created:** [May 26, 2014, 8:55am UTC](https://forums.unrealengine.com/t/how-can-i-make-my-character-jump-higher-on-longer-keypress/284246 "2014-05-26T08:55:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![NotAllama](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NotAllama](https://forums.unrealengine.com/u/NotAllama)\
**Post date:** [May 26, 2014, 8:55am UTC](https://forums.unrealengine.com/t/how-can-i-make-my-character-jump-higher-on-longer-keypress/284246/1 "2014-05-26T08:55:32Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Bohrium](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bohrium](https://forums.unrealengine.com/u/Bohrium)\
**Post date:** [May 26, 2014, 1:19pm UTC](https://forums.unrealengine.com/t/how-can-i-make-my-character-jump-higher-on-longer-keypress/284246/2 "2014-05-26T13:19:09Z")

</div>

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.

 ![7071-untitled.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/6/4/16402ae298d0e30e3fda6ef83cb5a210e9a2ec98.jpeg)

---

<div class="post-metadata">

**Author:** ![NotAllama](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NotAllama](https://forums.unrealengine.com/u/NotAllama)\
**Post date:** [May 27, 2014, 4:45am UTC](https://forums.unrealengine.com/t/how-can-i-make-my-character-jump-higher-on-longer-keypress/284246/3 "2014-05-27T04:45:21Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Bohrium](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bohrium](https://forums.unrealengine.com/u/Bohrium)\
**Post date:** [May 27, 2014, 5:22am UTC](https://forums.unrealengine.com/t/how-can-i-make-my-character-jump-higher-on-longer-keypress/284246/4 "2014-05-27T05:22:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Gibospartan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gibospartan](https://forums.unrealengine.com/u/Gibospartan)\
**Post date:** [September 6, 2018, 2:55pm UTC](https://forums.unrealengine.com/t/how-can-i-make-my-character-jump-higher-on-longer-keypress/284246/5 "2018-09-06T14:55:42Z")

</div>

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:

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/4/b/04b23aa84c1a96bfd1cc53a71dd9745db2288d99.jpeg "WTF Is? Jump and Stop Jumping in Unreal Engine 4 ( UE4 )") ](https://www.youtube.com/watch?v=34ZQmxyumoM)
