• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Trigger Help: Units Life Become Equal To

Status
Not open for further replies.
Level 4
Joined
Jul 12, 2011
Messages
67
Hi. My problem is that I am making a trigger that when a Units life is equal to (or less than) a unit will die.
I have 10 of these triggers, 1 every 10 numbers, I dont understand what im donig wrong, when the units life become 0 they all die at once, but I want it to happen every 10%.

Anub'Arak is the unit. Im making a boss fight that when his health is lowered by 10%, a ziggurat will explode and spawn cryptyfiends.

But they all die at the same time, when Anubarak dies. What am I doing wrong? Thanks in advance for ur help :D
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
this would work i think just add the zigurat and spawn stuff at the "then"
  • boss fight
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Triggering unit) Equal to Your_boss_unit
    • Actions
      • Set Boss_HP = (Max life of (Triggering unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Life of (Triggering unit)) Less than or equal to (Boss_HP / 10.00)
        • Then - Actions
        • Else - Actions
 
Level 8
Joined
Dec 9, 2009
Messages
397
  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • bosshp Equal to (==) 0
          • (Life of (Triggering unit)) Greater than or equal to (>=) ((Max life of (Attacked unit)) x 0.90)
        • Then - Actions
          • Set bosshp = 1
          • -------- Spawn your guys --------
          • -------- Add created units to a unit group --------
        • Else - Actions
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • bosshp Equal to (==) 1
              • (Life of (Triggering unit)) Greater than or equal to (>=) ((Max life of (Attacked unit)) x 0.80)
            • Then - Actions
              • Set bosshp = 2
              • -------- Spawn your guys --------
              • -------- Add created units to a unit group --------
            • Else - Actions
              • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • bosshp Equal to (==) 2
                  • (Life of (Triggering unit)) Greater than or equal to (>=) ((Max life of (Attacked unit)) x 0.70)
                • Then - Actions
                  • Set bosshp = 3
                  • -------- Spawn your guys --------
                  • -------- Add created units to a unit group --------
                • Else - Actions
Then a different trigger that when boss dies, kill all units in unit group

Is that what you were trying to do?
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
So, you have 10 ziggurats in that area, each 10% the boss loses HP, one ziggurat will be destroyed and spawns minions.

At the 10th ziggurat, of course, the boss will die first (9th ziggurat, the boss will have 10% HP left, in order for 10th ziggurat, another 10% HP must be dropped = anub'arak dies), only the the 10th ziggurat will be destroyed.

Right ?

I need some clarification.
 
Status
Not open for further replies.
Top