Ending a Timer by Function Name triggers multiple times. How do I stop this?

So I have a function I use which is a countdown timer. It is called on a Set Timer by Function Name node which is set to looping at 1 sec intervals. Great!
In this function I have a check to see if the ‘Time’ (float variable), is Zero, and if it is, then it triggers a Clear Timer by Function Name node and then it calls an Event that will spawn something.
The issue is, when this happens, there are multiple items spawned at the same time. There could just be two items, or there could be like six, and they will then all start exploding up into the air.

I don’t get why this happend. I’ve tried putting a Do Once node at the end of the timer AND at the start of the Event it calls which spawns the opbjects, but it still seems to spawn multiple times regardless.

If needed, I will post screenshots tomorrow as I’m in bed on the laptop now.lol

I think this is needed.

Do you use TimerHandle?
SetTimerByFunctionName returns a TimerHandle structure, which you can use later to clear the specific timer. Just store somewhere this handle and, then you need to stop looped timer, call ClearAndInvalidateTimerByHandle.

Do you need to disable looped timer after some exact time period?
If so, maybe you shoud use 2 timers: 1 looped timer as you use now and other non-looped timer (or even a delay node) to clear and invalidate looped timer handle.

Hi there. Sorry late replying but I’ve found the issue. The timer was running in a Widget BP that I was duplicating on a computer screen in the 3d world. So when the timer came to an end, it triggered the event on both the in-world widget and the on screen widget, thus, triggering more than once. Oops.

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