# One delay for two events

**URL:** <https://forums.unrealengine.com/t/one-delay-for-two-events/1187228>\
**Category:** Blueprint\
**Tags:** delay, unreal-engine, Blueprint, question\
**Created:** [June 3, 2023, 12:32am UTC](https://forums.unrealengine.com/t/one-delay-for-two-events/1187228 "2023-06-03T00:32:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![glupiakaczka](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@glupiakaczka](https://forums.unrealengine.com/u/glupiakaczka)\
**Post date:** [June 3, 2023, 12:32am UTC](https://forums.unrealengine.com/t/one-delay-for-two-events/1187228/1 "2023-06-03T00:32:26Z")

</div>

Hi, Im new to Unreal Engine. I am actually making a 2D game, and I want to add Dash feature to the game. My blueprint looks like this

 ![obraz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/8/9/b8931c6c94ddfc6bd0391974741f0151d34b1bb7.png)  
**I want there to be a delay between dash right and dash left**. How can I do that?

---

<div class="post-metadata">

**Author:** ![Mind-Brain](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mind-brain/32/906573_2.png) [@Mind-Brain](https://forums.unrealengine.com/u/Mind-Brain)\
**Post date:** [June 3, 2023, 12:36am UTC](https://forums.unrealengine.com/t/one-delay-for-two-events/1187228/2 "2023-06-03T00:36:23Z")

</div>

Hey @glupiakaczka! Welcome to the forums!

So instead of your “Do Once” nodes, try using a bool!

Make an _IsDashing_ bool and use a branch right after your input action, if _IsDashing_ is true, do nothing, and if _IsDashing_ is False:  
"Set IsDashing: True,  
launch,  
delay 2.0,  
then “Set IsDashing: False” and end the line.

This way you can’t dash if you’re already dashing, and it’ll reset the dash after 2 seconds 🙂

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [July 3, 2023, 12:37am UTC](https://forums.unrealengine.com/t/one-delay-for-two-events/1187228/3 "2023-07-03T00:37:09Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
