I am trying to tell every barracks owned my a certain player to train a footman / add a new footman to the training queue every two seconds so I created two triggers to work together:
1) Populate the unit group 'enemybarracks' with all of player 21's barracks and then
1) Populate the unit group 'enemybarracks' with all of player 21's barracks and then
-
set variable enemybarracks
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of (Picked unit)) Equal to Player 21 (Coal)
-
(Unit-type of (Picked unit)) Equal to Barracks
-
-
Then - Actions
-
Game - Display to (All players) the text: barracks added to '...
-
Unit Group - Add (Picked unit) to enemybarracks
-
-
Else - Actions
-
-
-
-
-
-
tell all enemybarracks to train footmen every 2 seconds
-
Events
-
Time - Every 2.00 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in enemybarracks and do (Actions)
-
Loop - Actions
-
Unit - Order (Picked unit) to train/upgrade to a Footman
-
-
-
-
Last edited: