# The event is called repeatedly, and the delay node takes effect only once

**URL:** <https://forums.unrealengine.com/t/the-event-is-called-repeatedly-and-the-delay-node-takes-effect-only-once/745490>\
**Category:** Blueprint\
**Tags:** unreal-engine, Blueprint, question\
**Created:** [January 9, 2023, 2:35pm UTC](https://forums.unrealengine.com/t/the-event-is-called-repeatedly-and-the-delay-node-takes-effect-only-once/745490 "2023-01-09T14:35:26Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![17lhf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@17lhf](https://forums.unrealengine.com/u/17lhf)\
**Post date:** [January 9, 2023, 2:35pm UTC](https://forums.unrealengine.com/t/the-event-is-called-repeatedly-and-the-delay-node-takes-effect-only-once/745490/1 "2023-01-09T14:35:26Z")

</div>

Hi everyone, I create a custom event which contains a delay node. I call it repeatedly, expecting everything in the event can do the same number times as I call it.

Example:

 ![QQ截图20230109221355](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/b/f/ebff7c3e0bde3c7ab2faf29e088706f5ca91c3f0.png)  
 ![906a5ed176970210a9d2b0e119ac39c8464236ff](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/f/b/4fbf471e9c200f31ca6cb93eb755f2825865c4cf.png)

Like the example, I click “P” five times in 2 seconds, and you can see it in image, print “Hello” five times, it is right.  
But the result is only print “world” once. I hope it can also print five times. I want to know the reason of only print once and how to do I achieve the effect which I hope?

---

<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:** [January 9, 2023, 2:42pm UTC](https://forums.unrealengine.com/t/the-event-is-called-repeatedly-and-the-delay-node-takes-effect-only-once/745490/2 "2023-01-09T14:42:13Z")

</div>

You’re starting the execution chain again, before it’s had a chance to complete.

There is no forking of background processes here.

The easiest way to get it to do what you want, is to spawn a blueprint which prints ‘hello’, and then prints ‘world’ 2 seconds later. ( then destroys itself )

Otherwise, you’d had to keep the requests in an array, with timer handles ( or something like that ).

---

<div class="post-metadata">

**Author:** ![ArcReed3215](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/arcreed3215/32/607037_2.png) [@ArcReed3215](https://forums.unrealengine.com/u/ArcReed3215)\
**Post date:** [January 9, 2023, 9:42pm UTC](https://forums.unrealengine.com/t/the-event-is-called-repeatedly-and-the-delay-node-takes-effect-only-once/745490/3 "2023-01-09T21:42:50Z")

</div>

Maybe you can try making a integer variable that increases based on the number of times you press ‘P’ , then add your delay. Once the delay is finished use a for loop to print “World” using the integer variable then reset the variable after you finish printing.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [January 9, 2023, 11:07pm UTC](https://forums.unrealengine.com/t/the-event-is-called-repeatedly-and-the-delay-node-takes-effect-only-once/745490/4 "2023-01-09T23:07:25Z")

</div>

> [@17lhf](#):
>
> Like the example, I click “P” five times in 2 seconds, and you can see it in image, print “Hello” five times, it is right.

Probably close to:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/2/9/4291be2a83f0cea9aa92ad28784c9316ee758e6b.png)

---

<div class="post-metadata">

**Author:** ![17lhf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@17lhf](https://forums.unrealengine.com/u/17lhf)\
**Post date:** [January 10, 2023, 12:54pm UTC](https://forums.unrealengine.com/t/the-event-is-called-repeatedly-and-the-delay-node-takes-effect-only-once/745490/5 "2023-01-10T12:54:52Z")

</div>

I originally thought that each call event was independent of each other, but in fact they are always using the same thing like static variables?

---

<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:** [January 10, 2023, 12:57pm UTC](https://forums.unrealengine.com/t/the-event-is-called-repeatedly-and-the-delay-node-takes-effect-only-once/745490/6 "2023-01-10T12:57:07Z")

</div>

Pressing the key again, restarts the execution of that line.

---

<div class="post-metadata">

**Author:** ![17lhf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@17lhf](https://forums.unrealengine.com/u/17lhf)\
**Post date:** [January 10, 2023, 1:14pm UTC](https://forums.unrealengine.com/t/the-event-is-called-repeatedly-and-the-delay-node-takes-effect-only-once/745490/7 "2023-01-10T13:14:15Z")

</div>

It seems like if an event needs a long time for work, and in fact, the external will call it frequently for a short period of time (Such as my example, call it again before it complete). Then, it will have problems.  
Maybe I need to rethink how to use event in my project.  
Thank you for you answer!

---

<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:** [January 10, 2023, 1:51pm UTC](https://forums.unrealengine.com/t/the-event-is-called-repeatedly-and-the-delay-node-takes-effect-only-once/745490/8 "2023-01-10T13:51:04Z")

</div>

You can hang an awful lot of stuff on an event, and it will all run in one frame, which is pretty quick 🙂

It’s just when you start introducing ‘latency’, signified on nodes by the clock, that things work differently

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/5/0/f50021220737751914707a3ba6328254da580436.png)
