Set Timer Delegate, No tick

Hello,

Just wanted to share something I learned about Timers. I had some trouble using Set timer and Clear Timer together. For whatever reason, when adding the function names, I could not get them to work.
See step 7 https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/UseTimers/Blueprints/index.html

“Set Timer Delegate” worked great but I didn’t like the fact that this event was constantly firing the delegate custom event “PlayerRegen”. The only way to stop it was with a branch however it kept going.

With my last attempt I tried using “Set Timer Delegate” with “Clear Timer” and it gave me the results I was looking for. Now when the Replenish volume is triggered, the timer keeps firing my “Regen” function I created and adds health energy or whatever you want it to be every 2 seconds. Once you end overlap, the “PlayerNotRegen” Custom event takes place and clears the timer which stops the “PlayerRegen” node from continuing. Now there’s nothing ticking unless the player is within the volume.

I’m sure a lot of people may already know how to do this but for those who don’t, like I did, this may help. I’m sure this can be applied to batteries and flashlights, cooldowns, etc.

Isaac

2b78d958c5c57a41b0a37c2fe2f6d0ebf02d6539.jpeg


**Solution: Turn Off Friendly Names**

Dear Isaac,

**Set Timer and Clear Timer will work perfectly** if you go to

Edit->Editor Preferences -> Appearance

and turn off Friendly Names!


The timer wants the actual non-friendly function name, but you are more-than-likely copying the edited friendly name which is not actually in the game code.

Or perhaps you are manually typing it, but including spaces perhaps, or capitalizations, that dont exist in the actual funciton name.

**Just turn off friendly names and Set Timer and Clear Timer will work great.**

Enjoy!

Rama

Thanks Rama, I didn’t realize there was a setting that specified whether or not friendly names is on or off.