• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Help with Triggers!

Status
Not open for further replies.
Level 6
Joined
Jul 25, 2005
Messages
221
This should work, albeit a bit odd, it gets the job done.
  • CheckHp
    • Events
      • Time - Every 0.25 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Building 1)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Life of (Picked unit)) Equal to (Max life of (Picked unit))
            • Then - Actions
              • Unit - Replace (Picked unit) with a Building 2 using The new unit's default life and mana
            • Else - Actions
The units life is counted as "Real" so when comparing life of a unit, look under real values.
 
Status
Not open for further replies.
Top