Announcement

Collapse
No announcement yet.

How to Stop an Event

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

    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.

    Click image for larger version

Name:	Issues with blueprint.jpg
Views:	1
Size:	668.9 KB
ID:	1147584
    Attached Files

    #2
    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
    [LEGENDS of EPICA]

    Comment


      #3
      The loop your using is kinda funky.
      Better off switching to a straight up timer and checking if damage was done recently.
      Thusly.
      Rule#21: Be polite, be professional, but have a plan to kill everyone you meet.

      Comment


        #4
        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.

        Comment


          #5
          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.
          [Released] Multiplayer Combat Editor
          A-RPG Sacred Swords
          Auto-Chess Live Development
          Youtube Tutorials

          Comment

          Working...
          X