# Auto Sprint

**URL:** <https://forums.unrealengine.com/t/auto-sprint/343041>\
**Category:** Blueprint\
**Tags:** running, unreal-engine, Blueprint, question\
**Created:** [January 4, 2016, 3:41am UTC](https://forums.unrealengine.com/t/auto-sprint/343041 "2016-01-04T03:41:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SyncFx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SyncFx](https://forums.unrealengine.com/u/SyncFx)\
**Post date:** [January 4, 2016, 3:41am UTC](https://forums.unrealengine.com/t/auto-sprint/343041/1 "2016-01-04T03:41:46Z")

</div>

Hello,

I’m trying to figure out how to setup auto sprint. What I mean is the following:

When I hold down Shift, I sprint. After lets say 1 second of holding, I let go and continue to sprint, until I press another input(ex aiming with mouse, fire weapon, or hit an object). So when I do any of those key presses or hitting a wall, my speed returns to normal.

---

<div class="post-metadata">

**Author:** ![Est\_engine](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/est_engine/32/1008648_2.png) [@Est\_engine](https://forums.unrealengine.com/u/Est_engine)\
**Post date:** [January 4, 2016, 1:37pm UTC](https://forums.unrealengine.com/t/auto-sprint/343041/2 "2016-01-04T13:37:52Z")

</div>

Hi man  
Depending on what are you using you should: setup the shift key imput , or enable imput on your actor.  
When that is pressed you start a timer , you can read here how [https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/UseTimers/Blueprints/index.html](https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/UseTimers/Blueprints/index.html)  
Otherwise you can take care of the time yourself , picking up the time from the tick event and adding to a var until you reach 1 (sec). When your var reach 1sec you add to your speed (movement component, or variable or what you are using…) And set another bool variable "Sprinting " to ON.  
There should be a event called keypress. that get fired everytime you press a key.  
In this event check if your variable Sprinting in On, if it is Set your speed to the normal average value…  
Or just decrese the speed until its normal.

---

<div class="post-metadata">

**Author:** ![Dj\_EKI](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dj\_EKI](https://forums.unrealengine.com/u/Dj_EKI)\
**Post date:** [January 4, 2016, 7:09pm UTC](https://forums.unrealengine.com/t/auto-sprint/343041/3 "2016-01-04T19:09:36Z")

</div>

![72827-1shiftimmerrennenplusabbruchmousetastatur.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/0/e/f0e2b607871aff991f31dd8b65cd20e6fdf5a886.jpeg)

---

<div class="post-metadata">

**Author:** ![DETERMINATOR20](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DETERMINATOR20](https://forums.unrealengine.com/u/DETERMINATOR20)\
**Post date:** [May 24, 2019, 11:37pm UTC](https://forums.unrealengine.com/t/auto-sprint/343041/4 "2019-05-24T23:37:45Z")

</div>

You could do a sprint that happens and after a delay of one second, if shift is still down then shift stays on, then, when any key is pressed disable sprinting.
