Announcement

Collapse
No announcement yet.

How to regenerate life after some time without taking damage.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to regenerate life after some time without taking damage.

    Well, I used a system of life and armor, which when I enter a "Box Collision" I take damage ... I was able to create another system that causes that if I leave this "Box Collision" for 5 seconds, only life regenerates slowly ... But how do I always REGENERATE life when I do not take damage? For example in the future I will add projectiles and weapons in my game. I will not copy the whole system for every weapon or thing that takes life. Need help...
    Here are some prints to help me.
    Oh and if you have some suggestions to improve this system I would apreciate
    PS: Both health and armor variables default value are set to 1.0

    #2
    Are you using Event Damage and Apply Damage to do the damage effect? if not I recommend doing so, it just makes life easier. So your box collider can call Apply Damage to your pawn.

    Anyway regardless to do the regenerate life use a Retriggerable Delay after you take damage. Set it to 5 seconds or w/e you like. After that time, apply your life regeneration.

    https://i.imgur.com/3DZi2i8.jpg

    Comment

    Working...
    X