I have been trying to troubleshoot this for a couple of days now and I can’t figure it out.
I have ‘status effects’ that affects the character, they are UObjects with looping timers.
Well, not much point in me explaining what’s happening, I think the blueprints speak for themselves. It’s really not that complex after all.
When the effect is added to the character, “Effect Applied” function is called. This starts these looping timers.
When the duration runs out or ticks reaches zero, they call the Stop Effect function.
Now, this is all working fine.
The problem is, I wish to be able to manually cancel some effects. So when I right click the widget button that is associated with a effect, the effect should stop.
Note that I’m calling a function on the base character, which only calls the Stop Effect function of the effect. Even if I call the stop effect directly from the widget, the problem persists.
As you can see, if I let the functions themselves call the Stop Effect function as either the duration or the tick is decreased, then the timers are cleared.
But if I call the Stop Effect function from in this case the base character, then it’s not clearing the timers. Which really is strange to me.
Am I missing something fundamental with timers?