Download

In Set timer by event node, Runtime Looping dosen't work

My intention is to execute event at every 1 second, for period of 5 seconds.

To achieve this I used blueprint node “Set timer by event”. Here is my logic:

482e7ee0a6aee5d841f83a6108cacf82333db1d8.jpeg

After 5 seconds, It set the value of Looping = False. So that set timer by event node stop executing MyCustomEvent in Loop.

The problem is even after setting the value of Looping = False, It will not stop executing the event. It goes on executing the event infinite time.

I think, The node set timer by event is not able to read the value of Looping variable at run-time.

Here are some of the screenshots. Is there any solution for this?

558e8cb894341a8fe612afa63a8c619bee82c6c7.jpeg

9aab0bb4145f6710a92187028f17c63444fda25b.png

9bd5734e1ae13056fad0ebddc9191ea61dc0732b.png

The “set timer by event” is not associated with your variable “Looping”, it only gets the value of “Looping” when it was called.

To stop the timer, use the “Clear Timer by Handle”. You need to store the “Timer Handle” when setting the timer.

Here are examples:
Set Timer by Event
Clear Timer by Handle

Sounds good. Thanks a lot :slight_smile: . I really appreciate it.

4 years after…thanks!

Thanks a lot Romero… it has been very useful 5 years after your answer :grinning:

You are welcome :slightly_smiling_face:

I feel very grateful that my articles help the community a lot: