# How to Cancel a Delay

**URL:** <https://forums.unrealengine.com/t/how-to-cancel-a-delay/390197>\
**Category:** Blueprint\
**Tags:** delay, bug, unreal-engine, Blueprint, question\
**Created:** [April 7, 2017, 12:11am UTC](https://forums.unrealengine.com/t/how-to-cancel-a-delay/390197 "2017-04-07T00:11:07Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![latuberculedemoniac](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@latuberculedemoniac](https://forums.unrealengine.com/u/latuberculedemoniac)\
**Post date:** [April 7, 2017, 12:11am UTC](https://forums.unrealengine.com/t/how-to-cancel-a-delay/390197/1 "2017-04-07T00:11:07Z")

</div>

Hi o/

I often use delays to activate or deactivate a component (like fire) but sometimes it could create some bugs if the actor is reset before the delay ends (for instance, when I simulate the reload of the level, I reset fire to off but if the delay is not finished, is set it back to on).

Is there a way to cancel a delay? Maybe “Task Wait Delay” could help me but i don’t know how to use it…

Thanks 🙂

[](https://dl.dropboxusercontent.com/s/185funbkln1zrrg/bug%20delay%20to%20cancel.PNG?dl=0)

---

<div class="post-metadata">

**Author:** ![vanlacke](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@vanlacke](https://forums.unrealengine.com/u/vanlacke)\
**Post date:** [April 7, 2017, 2:06am UTC](https://forums.unrealengine.com/t/how-to-cancel-a-delay/390197/2 "2017-04-07T02:06:36Z")

</div>

You can’t cancel a delay.

However, you can start activating/deactivating things based on relevant criteria instead of using “hard” delays (delay x amount of time and praying for the best).

---

<div class="post-metadata">

**Author:** ![KoalaHao](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KoalaHao](https://forums.unrealengine.com/u/KoalaHao)\
**Post date:** [May 22, 2017, 5:01am UTC](https://forums.unrealengine.com/t/how-to-cancel-a-delay/390197/3 "2017-05-22T05:01:42Z")

</div>

You can’t cancel it, but you can check a condition at the end of a delay and decide whether you want to execute what ever is after the delay

---

<div class="post-metadata">

**Author:** ![Coderandrew](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Coderandrew](https://forums.unrealengine.com/u/Coderandrew)\
**Post date:** [June 7, 2017, 6:31pm UTC](https://forums.unrealengine.com/t/how-to-cancel-a-delay/390197/4 "2017-06-07T18:31:41Z")

</div>

You CAN cancel a delay, but you have to use C++. I added a blueprint node that will cancel all pending delays for a given blueprint actor. Technically, it cancels all pending latent actions, not just delays, so it can have additional side effects – careful.

```
void UNodeLibrary::CancelDelays(AActor *actor)
{
	if (actor == nullptr)
		return;

	actor->GetWorld()->GetLatentActionManager().RemoveActionsForObject(actor);
}

```

---

<div class="post-metadata">

**Author:** ![rolffson](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rolffson/32/470238_2.png) [@rolffson](https://forums.unrealengine.com/u/rolffson)\
**Post date:** [December 22, 2022, 3:38pm UTC](https://forums.unrealengine.com/t/how-to-cancel-a-delay/390197/5 "2022-12-22T15:38:31Z")

</div>

yes, old thread, but since it’s the first to come up when googling…  
here’s an example of one possible solution for a common case:  
retriggeable\_delay is forced to trigger ‘immediately’, which then gets intercepted

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/f/0/6f0510069a0d77ce4a3023228facfb02da0ee231.png)  
_comments added using ‘Comment Bubble Assist’ plugin_

---

<div class="post-metadata">

**Author:** ![goldensyrupgames](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@goldensyrupgames](https://forums.unrealengine.com/u/goldensyrupgames)\
**Post date:** [November 25, 2023, 6:26am UTC](https://forums.unrealengine.com/t/how-to-cancel-a-delay/390197/6 "2023-11-25T06:26:03Z")

</div>

Oof, this is excellent. Thankyou!

---

<div class="post-metadata">

**Author:** ![JohnADaniels](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/johnadaniels/32/1080686_2.png) [@JohnADaniels](https://forums.unrealengine.com/u/JohnADaniels)\
**Post date:** [December 30, 2023, 12:43am UTC](https://forums.unrealengine.com/t/how-to-cancel-a-delay/390197/7 "2023-12-30T00:43:03Z")

</div>

You can also put a gate at the end of the delay

---

<div class="post-metadata">

**Author:** ![reygrey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@reygrey](https://forums.unrealengine.com/u/reygrey)\
**Post date:** [March 19, 2024, 2:50pm UTC](https://forums.unrealengine.com/t/how-to-cancel-a-delay/390197/8 "2024-03-19T14:50:25Z")

</div>

You saved my life, Thanks!

---

<div class="post-metadata">

**Author:** ![FatPurple](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FatPurple](https://forums.unrealengine.com/u/FatPurple)\
**Post date:** [March 23, 2024, 8:14pm UTC](https://forums.unrealengine.com/t/how-to-cancel-a-delay/390197/9 "2024-03-23T20:14:19Z")

</div>

That’s what I needed! The “Retriggerable Delay”. Sovled it all 😁 Idk why it doesn’t come up when you search under Delay 🤔 But yes, Thank You!!!

---

<div class="post-metadata">

**Author:** ![Perfect\_Human\_Interface](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Perfect\_Human\_Interface](https://forums.unrealengine.com/u/Perfect_Human_Interface)\
**Post date:** [September 2, 2025, 9:24pm UTC](https://forums.unrealengine.com/t/how-to-cancel-a-delay/390197/10 "2025-09-02T21:24:05Z")

</div>

If you need more control, such as pausing, restarting, and cancelling, you should consider using timers instead of delays.
