I think you have a couple of layers of ‘strangeness’ going on here.
First off, your health regen needs to be run by a custom event. Functions are for getting stuff, custom events for doing stuff.
You’re not actually getting anything from the function, but that return node will be firing anyway, even if the branch before it doesn’t fire. Because functions always return.
Second, I’m gathering you have stuff to do with damage and health on tick. Please take it off tick 
Tick runs every frame FOREVER and EVER. It’s for animation and stuff that needs to happen every frame. Damage and healing are things that just trigger for a little while and then stop.
I can’t show you a bit of code right now, as I’m not at a machine, but if you just use a custom event for the healing, you can hang a delay node on it ( another thing you can’t do in functions ), then start a timer that fires once per second which adds health to the player.
Then you can kill the timer.
You make the timer with the node SetTimerByFunctionName:
( The example I copied there is dealing damage, but it’s the same idea for health… )
Hi,
I’m relatively new to Unreal Engine 4 so this might be a bit of a silly question.
Currently I have a character setup with a health regen function that works on a 2.5 second delay.
My issue is that this delay will trigger constantly after 2.5 of the first damage tick being dealt.
I’d like to try and set up a system that not only stops the health regen if damage is being dealt but also the health doesn’t regen until 5 seconds after the damage has been dealt and is not going on constantly.
Here is my current health regeneration function within the third person character.
I hope this makes sense to everyone.
Any help is greatly appreciated.
Thank you
Kyle
Hi,
First of all, thanks for the response.
Secondly, would you mind showing me some code for this a bit more in depth as I don’t fully understand what / how I need to change my current setup (The joys of being new to UE4)
I’m not familiar also with setting up custom events correctly so would greatly appreciate any advice you have with regards to this also.
Thanks
Looking at the picture above, you can see it starts a timer when the player steps into the fire, and stops the timer when the player steps out of the fire. The other crucial element is the function name in the large node ‘FireDamage’.
So we would also need another custom event called FireDamage.
The setup will automatically call FireDamage until the timer is stopped by PlayerNotInFire.
You can do exactly the same thing, but with losing stamina. Three nodes, one to start the timer, one to stop the timer and one ( called every interval ) which just decrements the stamina counter
Then it’s just the same thing for gaining stamina.
When the player is supposed to start gaining stamina, start the add-stamina timer. When the player is supposed to start losing stamina, start the lose-stamina timer.
I don’t know exactly when you want to start/stop those events, that’s up to you.