Attempting to Reset Timer in Set Timer by Event

Hey everyone,

I have a Boot PowerUp in my game, which is supposed to double the Player’s Jump Height for 10 seconds, then reset it back to the Default Jump Height. That does work.
My problem is with my Timer because when the Player interacts with another Boot PowerUp, the timer is supposed to Reset back to 10 seconds; however, mine does not. Instead, the 10 second Timer finishes, and no additional time is given to the Player, and that’s how I know that the Timer isn’t being reset with every additional interaction with the PowerUp.



Any ideas?

Also, Blueprint is an Actor.

It looks like your timer handle is kept on each powerup, so when you overlap a second one, the timer of the first one is still running, since the second power up will invalidate its own timer, which hasn’t started yet

I think for what you want to do you probably need a more sophisticated system of statuses, to keep track of each status, and be able to refresh duration

The gameplay ability system is made exactly for that, and you can achieve what you want quite easily, by creating a gameplay effect that doesn’t stack, that grants the power up ability
The ability can then set the jump velocity on activate, and reset it back to the original on end ability
The gameplay effect will automatically add the ability, which you can then activate manually (or write some code to automatically activate certain abilities upon granting them, which requires C++), granting the increased jump velocity, and if you touch another powerup, the duration of the gameplay effect (and in turn the ability) will be refreshed as expected, prolonging the powerup’s effects

If you’re not planning to have more effects, you can get away with potentially moving this powerup’s logic to the player character itself, and activate it from there instead. That way you can have a single timer for all boots powerups, that can be refreshed as you want (you can also use a retriggerable delay to make it a bit more simple)

2 Likes

Thank you for this reply, it has given me a lot to think about.

Speaking of which, what is the gameplay ability system? I’ve seen people make tutorials on how to build their own abilities, but I don’t know of a specific method for it.

Lastly, I only plan to have three abilities in total. I’m trying to control the scope of my game to a manageable level.