# How do I create a timer that resets itself when the player moves (Blueprints)?

**URL:** <https://forums.unrealengine.com/t/how-do-i-create-a-timer-that-resets-itself-when-the-player-moves-blueprints/2013265>\
**Category:** Blueprint\
**Tags:** moving, timer, unreal-engine, Blueprint, question\
**Created:** [September 9, 2024, 1:54pm UTC](https://forums.unrealengine.com/t/how-do-i-create-a-timer-that-resets-itself-when-the-player-moves-blueprints/2013265 "2024-09-09T13:54:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MinniVini](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MinniVini](https://forums.unrealengine.com/u/MinniVini)\
**Post date:** [September 9, 2024, 1:54pm UTC](https://forums.unrealengine.com/t/how-do-i-create-a-timer-that-resets-itself-when-the-player-moves-blueprints/2013265/1 "2024-09-09T13:54:29Z")

</div>

I’m working on a game and need a timer that, once activated, continuously checks if the player is moving. If the player moves, a cancel function should be called, and the timer should reset. Is there a way to achieve this using Blueprints in Unreal Engine?

---

<div class="post-metadata">

**Author:** ![gh0stfase1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/gh0stfase1/32/1194639_2.png) [@gh0stfase1](https://forums.unrealengine.com/u/gh0stfase1)\
**Post date:** [September 9, 2024, 2:10pm UTC](https://forums.unrealengine.com/t/how-do-i-create-a-timer-that-resets-itself-when-the-player-moves-blueprints/2013265/2 "2024-09-09T14:10:37Z")

</div>

Yes, you could check the velocity of the player…if it’s non-zero then the player is moving.

---

<div class="post-metadata">

**Author:** ![MinniVini](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MinniVini](https://forums.unrealengine.com/u/MinniVini)\
**Post date:** [September 9, 2024, 2:32pm UTC](https://forums.unrealengine.com/t/how-do-i-create-a-timer-that-resets-itself-when-the-player-moves-blueprints/2013265/3 "2024-09-09T14:32:39Z")

</div>

I have already tried this but have not found a way to link it to a timer

---

<div class="post-metadata">

**Author:** ![gh0stfase1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/gh0stfase1/32/1194639_2.png) [@gh0stfase1](https://forums.unrealengine.com/u/gh0stfase1)\
**Post date:** [September 9, 2024, 2:36pm UTC](https://forums.unrealengine.com/t/how-do-i-create-a-timer-that-resets-itself-when-the-player-moves-blueprints/2013265/4 "2024-09-09T14:36:28Z")

</div>

A simple solution would be to put the check on tick…while the player is not moving set the timer variable to 0…while the player is moving, increment the timer variable by delta time.
