Function not being called (Health regen system)

For some reason, the function I’m using to regen player health is not being called. The player’s hp is supposed to regen every second.

I’m using this example below:
https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/UseTimers/Blueprints/index.html

Any idea what’s wrong? If I call the function elsewhere directly, it works but I’m not sure why it doesn’t if I use a set timer event.

Can you post your blueprints? Often times if a timer is broken in one of my projects, it’s usually because i misspelled the function name in the string entry, or when i start the timer during a begin play, there’s a broken cast somewhere that i left open ended preventing the node sequence to fully execute.

Sorry am quite new. I did post some screenshots of my blueprints. Is that what you mean or do you need me to export my blueprints? If so how do I do that?

oh, sorry, didn’t see screenshots. for your loop timer, set some other time than zero like every second or something just for testing purposes. plug the return value of the timer into the handle pin of the clear timer by handle node (or to where you are setting the variable if you want to use the variable). and unplug the tick’s connection to the function, but i’m guessing that was just for testing anyhow.

for your actual function being called, right now you’re just printing the string, so you’ll need to plug the output of the ‘healthregen’ node into the input of the set health node.

I think the problem could be that you’re calling a timer on event tick - meaning you get a new timer function every time or that it gets overridden (the latter is most likely).

Try to call it from begin play instead. As for the time value itself - a good value is the amount of time each frame takes at 60 fps; that is, 0.01667 seconds.

Thanks it’s working now! I didn’t know I had to plug the return value of the Set Timer thingy into the Clear Timer.

Thanks a lot man…I combined yours with paradoc’s suggestion and it works now. Thanks also for the breakdown in logic on how event tick affects the timer. I had always thought the tick would keep calling the timer since I need it to be on repeat.

Great that you got it fixed! =) Please feel free to mark the best answer as correct!