• 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.

[Trigger] Train Comp Troops

Status
Not open for further replies.
Level 3
Joined
Aug 19, 2006
Messages
45
This trigger confuses me. I have no idea how to make it. Its like the trigger in Alliance VS. the Horde. When you get the Peon to make a building, it will have troop icons like Tauren, which says -adds 1 Tauren to the spawn...or something similar to that.My question is, how do I make a trigger similar to that?
 
Level 6
Joined
Feb 2, 2005
Messages
205
  • Meele
    • Events
      • Time - Every 15.00 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
    • Loop - Actions
      • Unit Group - Pick every unit in (Units owned by (Picked player) of type Meele Tower 1) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) belongs to an ally of Player 1 (Red)) Equal to True
            • Then - Actions
              • Unit - Create 1 SpawnArray[(Round + 12)] for EastWest[0] at (Position of (Picked unit)) facing (Random point in West <gen>)
              • Unit - Add a 180.00 second Generic expiration timer to (Last created unit)
              • Unit - Order (Last created unit) to Attack-Move To (Random point in West <gen>)
              • Unit - Change color of (Last created unit) to (Color of (Owner of (Picked unit)))
              • Set UnitStats[1] = (UnitStats[1] + 1)
            • Else - Actions
              • Unit - Create 1 SpawnArray[(Round + 12)] for EastWest[1] at (Position of (Picked unit)) facing (Random point in Ost <gen>)
              • Unit - Add a 180.00 second Generic expiration timer to (Last created unit)
              • Unit - Order (Last created unit) to Attack-Move To (Random point in Ost <gen>)
              • Unit - Change color of (Last created unit) to (Color of (Owner of (Picked unit)))
              • Set UnitStats[4] = (UnitStats[4] + 1)
Well this Trigger will work, but it leaks. Toprevent leaks create Groupes, and add Units to it.
 
Status
Not open for further replies.
Top