# Delay node causes macro to stop executing

**URL:** <https://forums.unrealengine.com/t/delay-node-causes-macro-to-stop-executing/565661>\
**Category:** Blueprint\
**Tags:** Execution-Flow, unreal-engine, UE5-0, question, Blueprint\
**Created:** [May 25, 2022, 1:38am UTC](https://forums.unrealengine.com/t/delay-node-causes-macro-to-stop-executing/565661 "2022-05-25T01:38:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmancoder1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jmancoder1](https://forums.unrealengine.com/u/jmancoder1)\
**Post date:** [May 25, 2022, 1:38am UTC](https://forums.unrealengine.com/t/delay-node-causes-macro-to-stop-executing/565661/1 "2022-05-25T01:38:06Z")

</div>

[Here](https://blueprintue.com/blueprint/poj_jn0d/) is a link to the Macro nodes. I am executing this after the OnDestroyed event, but everything works just fine when I remove the Delay node. I have tried deleting my Intermediate folder and restarting the editor, but I cannot seem to fix this. Any ideas?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [May 25, 2022, 6:34am UTC](https://forums.unrealengine.com/t/delay-node-causes-macro-to-stop-executing/565661/2 "2022-05-25T06:34:06Z")

</div>

You can’t use a delay node in the destruction code :). I think the moment the compiler sees this, it just bins the rest of the code.

---

<div class="post-metadata">

**Author:** ![jmancoder1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jmancoder1](https://forums.unrealengine.com/u/jmancoder1)\
**Post date:** [May 25, 2022, 3:31pm UTC](https://forums.unrealengine.com/t/delay-node-causes-macro-to-stop-executing/565661/3 "2022-05-25T15:31:29Z")

</div>

I know that you can’t use latent nodes in functions, but what about macros? My code originally executed properly, even with a delay node.

---

<div class="post-metadata">

**Author:** ![UnrealEverything](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@UnrealEverything](https://forums.unrealengine.com/u/UnrealEverything)\
**Post date:** [May 25, 2022, 4:36pm UTC](https://forums.unrealengine.com/t/delay-node-causes-macro-to-stop-executing/565661/4 "2022-05-25T16:36:08Z")

</div>

As far as I know macros containing latent nodes become latent themselves resulting in the same restrictions as the original latent node itself. Why are you not using a timer rather than the delay?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [May 25, 2022, 5:02pm UTC](https://forums.unrealengine.com/t/delay-node-causes-macro-to-stop-executing/565661/5 "2022-05-25T17:02:54Z")

</div>

You can use latency in a macro, no problemo. But you can’t have a delay in a kill sequence 🙂

---

<div class="post-metadata">

**Author:** ![jmancoder1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jmancoder1](https://forums.unrealengine.com/u/jmancoder1)\
**Post date:** [May 25, 2022, 7:43pm UTC](https://forums.unrealengine.com/t/delay-node-causes-macro-to-stop-executing/565661/6 "2022-05-25T19:43:39Z")

</div>

Ah, I see it now. The Delay node won’t work after I destroy the actor, and that’s what I changed.
