How to Stop an Event

So I have made a health regeneration system that has a 10 sec delay when you take damage and increase hp by 1 every 0.1 seconds (as displayed below). It works perfectly except for the fact that it infinity regenerates even when you take dmg. I was wondering if anyone knew how to make it so that the action of regeneration stops when g (or dmg) is received. Also I was trying a couple of things to fix this and that’s why regeneration starts on begin play. So help please.

6789508af885fd712c311bad222b9483b9296527.jpeg

Health < 100 maybe?

Maybe also add a boolean check if G (or event) was already started.

condition get Regen if false run regen, Regen true, and at the end of the chain add Regen false

I’m new to BP’s too, so these are just some guesses

The loop your using is kinda funky.
Better off switching to a straight up timer and checking if damage was done recently.
Thusly.

Will this be able to update the widget that I have set up for the character? Im gong to check that right now then I will let everyone know.

On Event Tick ->

  • If “InCombat” == False -> Regenerate the character’s health
  • If “InCombat” == True -> “InCombatCooldown” - DeltaTime
  • If “InCombatCooldown” <= 0 -> Set “InCombat” == False

On Event Take Damage ->

  • Set “InCombatCooldown” = 10
  • Set “InCombat” == True

If you want to keep your Timer’s style, you can use a “Gate” (search for it in the list of nodes).