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.
Announcement
Collapse
No announcement yet.
How to Stop an Event
Collapse
X
-
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).Last edited by Yun-Kun; 04-06-2015, 04:26 PM.
Comment
Comment