Old topic, but since I’m new to Unreal Development and I’ve also come across this issue on 4.24 I thought it might be worth sharing my work around.
I had the exact same problem. Except that I had an Event where I would have a Set Timer by Event delegate. Tried to move it to a function and it was also no good.
What I did was create an Object blueprint that is used to set the timer and then dispatch an event upon time out. Instead of having the event set the timer in the main blueprint, it Constructs the Object then Binds an Event to the Event Dispatcher that, then, handles the task.
Something like this…
Task manager blueprint:
Scheduler object:
Don’t know how efficient this setup is in terms of system resources consumption, but it solved my problem. From what I understand, given the scheduler Object references are properly cleared, it should be garbage collected and destroyed.
Didn’t try Shohei’s approach mentioned in the original post.
What I could reason of the blueprint behavior is that the Set Timer delegate node will always get the last parameter sent to the event/function that sets it up, what actually makes a lot of sense, thus if it’s called twice in a time interval shorter than the time out it will mess things up.
Hope it helps anyone with the same issue.