- Joined
- Nov 1, 2007
- Messages
- 71
Hey folks,
So, I'm making a map similar to castle fight, where the buildings are automatically training units. This trigger system seems to work, until I add in a unit / building type, and then it just auto trains the last variable set. How do I make it such that it's creating a loop and the unit / building types are being stored into some sort of group that can be referenced later, instead of making a separate trigger for each unit and each building.
So, I'm making a map similar to castle fight, where the buildings are automatically training units. This trigger system seems to work, until I add in a unit / building type, and then it just auto trains the last variable set. How do I make it such that it's creating a loop and the unit / building types are being stored into some sort of group that can be referenced later, instead of making a separate trigger for each unit and each building.
-
Buildings
-
Events
-
Time - Elapsed game time is 1.00 seconds
-
-
Conditions
-
Actions
-
Set VariableSet NumberOfBuilding = (NumberOfBuilding + 1)
-
Set VariableSet BuildingType = Barracks
-
Set VariableSet UnitType = Footman
-
-------- ---------------------- --------
-
Set VariableSet NumberOfBuilding = (NumberOfBuilding + 1)
-
Set VariableSet BuildingType = Hunter's Lodge
-
Set VariableSet UnitType = Rifleman
-
-
-
Train First
-
Events
-
Unit - A unit Finishes construction
-
-
Conditions
-
Actions
-
For each (Integer NumberOfBuilding) from 1 to NumberOfBuilding, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Constructed structure)) Equal to BuildingType
-
-
Then - Actions
-
Unit - Order (Constructed structure) to train/upgrade to a UnitType
-
Unit - Order (Constructed structure) to train/upgrade to a UnitType
-
-
Else - Actions
-
-
-
-
-
-
West Side Loop Training
-
Events
-
Unit - A unit Finishes training a unit
-
-
Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Owner of (Trained unit)) Equal to Player 1 (Red)
-
(Owner of (Trained unit)) Equal to Player 2 (Blue)
-
-
-
-
Actions
-
Unit - Order (Triggering unit) to train/upgrade to a (Unit-type of (Trained unit))
-
Set VariableSet EastPosition = (Center of Team B Start <gen>)
-
Unit - Order (Trained unit) to Attack-Move To.EastPosition
-
Custom script: call RemoveLocation(udg_EastPosition)
-
-