Code:Trigger A1 Event Unit - Captain 0340 <gen> Dies Condition (Owner of (Triggering unit)) Equal to Player 5 (Yellow) Action if died unit is in Area A then Set Control_Boolean[1] = True Trigger - Turn on Top Def A2 <gen> else if died unit is in area B then Set Control_Boolean[2] = True Trigger - Turn on Top Def A2 <gen> else if died unit is in area C then Set Control_Boolean[3] = True Trigger - Turn on Top Def A2 <gen> else
Code:Trigger A2 Event Time - Every 0.03 seconds of game time Condition Action integer A from 1 to 3 if Control_Boolean [integer A] = True then Unit - Order Barracks [Integer A] to train/upgrade to a Knight Set Control_Boolean [integer A] = False else
XYZ
Event
After 0.5 seconds of game-time
Condition
Action
Set Barrack [1] = barrack X
Set Barrack [2] = barrack Y
Set Barrack [3] = barrack Z
Code:Trigger A3 Event Unit - Barracks [1] Finishes training a unit Condition (Unit-type of (Trained unit)) Equal to Knight Action Unit - Order (Trained unit) to Attack-Move To (Center of Area A)
Code:Trigger A4 Event Unit - Barracks [2] Finishes training a unit Condition (Unit-type of (Trained unit)) Equal to Knight Action Unit - Order (Trained unit) to Attack-Move To (Center of Area B)
Code:Trigger A5 Event Unit - Barracks [3] Finishes training a unit Condition (Unit-type of (Trained unit)) Equal to Knight Action Unit - Order (Trained unit) to Attack-Move To (Center of Area C)