Countdown to death

krog99

New Member
Reaction score
2
i got a Real-variable starting at 10, but I need to make a trigger like this:

Event - Specific unit owned by player 1 to 10 dies
Action - Set HumanCountdown = HumanCountdown - 1.00

The specific unit is in this variable: HumanBuilder[1] = Red specific unit and [2] = Blue specific unit and so on. Highest is [10] = Light Blue.

This is what i got so far:

Trigger:
  • Humans Die
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (HumanBuilder[(Integer A)] is dead) Equal to True
            • Then - Actions
              • Set HumansCountdown = (HumansCountdown - 1.00)
              • Set HumanBuilder[(Integer A)] = No unit
            • Else - Actions
              • Do nothing


But aren't there a way do to this, without a periodic time event?

EDIT: Just tried this trigger again and the HumansCountdown is just keeping going down -10 per second. It aren't checking the Condition.
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
sorry this is freehand, my WE is somehow broken at the moment:

Trigger:
  • FreehandTrigger
    • Events
      • Unit - A unit dies
    • Conditions
      • (Triggering Unit) Equal to HumanBuilder[(player number of (owner of (triggering Unit)))]
    • Actions
      • Set HumansCountdown = (HumansCountdown - 1.00)


As i said, beware its freehand! but it should work.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top