# Auto run on key press toggle like MMOS usually have UE5

**URL:** <https://forums.unrealengine.com/t/auto-run-on-key-press-toggle-like-mmos-usually-have-ue5/621061>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE5-0, Blueprint, question\
**Created:** [August 4, 2022, 6:40am UTC](https://forums.unrealengine.com/t/auto-run-on-key-press-toggle-like-mmos-usually-have-ue5/621061 "2022-08-04T06:40:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Monster-WolfRed](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/monster-wolfred/32/557695_2.png) [@Monster-WolfRed](https://forums.unrealengine.com/u/Monster-WolfRed)\
**Post date:** [August 4, 2022, 6:40am UTC](https://forums.unrealengine.com/t/auto-run-on-key-press-toggle-like-mmos-usually-have-ue5/621061/1 "2022-08-04T06:40:56Z")

</div>

Hi all,

I was hoping someone here could help.

Im trying to create an autorun on keypress (numlock) for a third person character/camera. however have been unable to do it and unable to find anything helpful online.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/3/b/03b08511765298a4ff2190b2d3da4ba0cb133a03.png)  
This is what i currently have set up but it does nothing…

Any help is appreciated.  
Cheers

---

<div class="post-metadata">

**Author:** ![Chasetopher](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chasetopher](https://forums.unrealengine.com/u/Chasetopher)\
**Post date:** [August 4, 2022, 6:47am UTC](https://forums.unrealengine.com/t/auto-run-on-key-press-toggle-like-mmos-usually-have-ue5/621061/2 "2022-08-04T06:47:03Z")

</div>

![Toggle Sprint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/c/b/1cbf377a78bd0bdbffe3e91780a4bfa87bef9fae.png)

Hope this helps 🙂

Don’t forget to set max walk speed ^

---

<div class="post-metadata">

**Author:** ![Monster-WolfRed](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/monster-wolfred/32/557695_2.png) [@Monster-WolfRed](https://forums.unrealengine.com/u/Monster-WolfRed)\
**Post date:** [August 4, 2022, 8:00am UTC](https://forums.unrealengine.com/t/auto-run-on-key-press-toggle-like-mmos-usually-have-ue5/621061/3 "2022-08-04T08:00:04Z")

</div>

Thanks Chasetopher,

Will give it a try now.

Cheers

---

<div class="post-metadata">

**Author:** ![Monster-WolfRed](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/monster-wolfred/32/557695_2.png) [@Monster-WolfRed](https://forums.unrealengine.com/u/Monster-WolfRed)\
**Post date:** [August 4, 2022, 8:18am UTC](https://forums.unrealengine.com/t/auto-run-on-key-press-toggle-like-mmos-usually-have-ue5/621061/4 "2022-08-04T08:18:00Z")

</div>

@Chasetopher - it worked! I added a flipflop after the branch and plugged both true and false into it so I could toggle it on and off. Now just to refine it so that any direction button WASD will toggle off and stop the auto run. Thank you for your help.

---

<div class="post-metadata">

**Author:** ![Monster-WolfRed](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/monster-wolfred/32/557695_2.png) [@Monster-WolfRed](https://forums.unrealengine.com/u/Monster-WolfRed)\
**Post date:** [August 4, 2022, 8:28am UTC](https://forums.unrealengine.com/t/auto-run-on-key-press-toggle-like-mmos-usually-have-ue5/621061/5 "2022-08-04T08:28:18Z")

</div>

This is what I ended up with and works just how I want it to. Thanks again to Chasetopher \<3

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/7/a/87ab651405a85dd041e97803db0bd7da6714458c.png)

---

<div class="post-metadata">

**Author:** ![Chasetopher](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chasetopher](https://forums.unrealengine.com/u/Chasetopher)\
**Post date:** [August 5, 2022, 1:47am UTC](https://forums.unrealengine.com/t/auto-run-on-key-press-toggle-like-mmos-usually-have-ue5/621061/6 "2022-08-05T01:47:35Z")

</div>

Sorry this is so late, but it might be better to “Clear and invalidate timer” using the Sprint Timer variable off of you WASD movement inputs, that way you don’t have multiple keybind inputs.
