"Set Timer by Event" not firing bound delegate event after clearing timer once

Hello :wave:

I ran into an issue using the “Set Timer by Event” node in blueprints:
Everything works fine in the “first run” :point_down:



(Setting timer → Delegate event gets called → Some logic → Timer gets "cleared and invalidated)

But once the “Set Timer by Event” gets triggered again (in our case when going back to the level selection from “ingame”) the code reaches the node but the delegate event doesn’t get fired at all :frowning_face:

I hope somebody can give a hint in the right direction because I am already clueless at what the issue here is.

Am I not allowed to bind a delegate to the timer a second time? Do I need to clear it somehow beforehand?

Another thing worth noting: when I set a breakpoint at the “Set Timer by Event” node and reach it, on inspecting the timer handle trying to check what is bound, the engine crashes on me. I already tried it on different “Set Timer by Event” nodes but the issue remains on all of them. :sweat_smile:

I appreciate every hint or idea!

Greetings,
Markus
Bagpack Games

never used timer by event…but why dont just use by function name instead?

image

if function/event is in same BP no need to attach any object in the inputs.

1 Like

Thanks for the suggestion, I don’t know if that makes any difference but I will try using a function instead, maybe the timer/delegate will get cleared properly then?

I will report back! :smiley:

it works…I use all the time…dont even need to keep the event handler…
just invoke and kill it by name using set and clear nodes.

1 Like

example:

Thank you for the suggestions and help so far!

Apparently putting the logic inside a function didn’t solve my issue.
On the first run everything works fine but after calling “Set Timer by Function Name” a second time (timer was cleared before succesfully) the delegate function doesn’t get called at all :frowning_face:

Also the engine crash makes me especially suspicious as I am not able to inspect the timer :thinking:

Edit: It is also worth mentioning this logic resides inside the game mode, if that makes any difference?

Edit 2: After hours and hours of debugging I figured out that the problem was indeed the human in front of the computer. The game was still paused when activating the timer and event logic, which is why the timer didn’t run. :man_facepalming:

Learning: Always check your pause logic before anything else? :sweat_smile:

Hi there @Bagpack_Games, hope you’re well!

This topic has been moved from International to Programming & Scripting: Blueprint.

When posting, please review the categories to ensure your topic is posted in the most relevant space.

Thanks and happy developing!

1 Like