- Joined
- Jun 16, 2008
- Messages
- 333
So I am making a map with income and I set up this trigger
and I have this trigger to produce the units
but when the units come out there is like 10 but I only want one. If you can help me with this I will +rep you and thank you.
-
Income Init
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
-------- 1 --------
-
Set Income_unit[1] = Arrow Tower 1
-
Set Income_provided[1] = 1
-
-------- 2 --------
-
Set Income_unit[2] = Orc Burrow 2
-
Set Income_provided[2] = 2
-
-------- 3 --------
-
Set Income_unit[3] = Watch Tower 3
-
Set Income_provided[3] = 3
-
-------- 4 --------
-
Set Income_unit[4] = Arcane Tower 4
-
Set Income_provided[4] = 4
-
-------- 5 --------
-
Set Income_unit[5] = Farm 5
-
Set Income_provided[5] = 5
-
-------- 6 --------
-
Set Income_unit[6] = Halls of the Dead 6
-
Set Income_provided[6] = 6
-
-------- 7 --------
-
Set Income_unit[7] = Fountain Of Life Blood 7
-
Set Income_provided[7] = 7
-
-------- 8 --------
-
Set Income_unit[8] = Pedestal 8
-
Set Income_provided[8] = 8
-
-------- 9 --------
-
Set Income_unit[9] = Gnoll Hut 9
-
Set Income_provided[9] = 9
-
-------- 10 --------
-
Set Income_unit[10] = Aviary 10
-
Set Income_provided[10] = 10
-
-------- 11 --------
-
Set Income_unit[11] = Ice Hut
-
-
-
Ice Hut 11
-
Set Income_provided[11] = 13
-
-------- 12 --------
-
Set Income_unit[12] = Pig Farm 12
-
Set Income_provided[12] = 15
-
Set Income_totalunits = 12
-
-
Units Suggestion
-
Events
-
Unit - A unit Finishes training a unit
-
-
Conditions
-
Actions
-
For each (Integer generalintegers[1]) from 1 to Income_totalunits, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Trained unit)) Equal to Income_unit[generalintegers[1]]
-
-
Then - Actions
-
Unit - Remove (Trained unit) from the game
-
Set Income[(Player number of (Owner of (Triggering unit)))] = (Income[(Player number of (Owner of (Triggering unit)))] + Income_provided[generalintegers[1]])
-
-
Else - Actions
-
Unit - Create 1 (Unit-type of (Trained unit)) for Player 12 (Brown) at (Center of Box 1 <gen>) facing 0.00 degrees
-
Unit - Create 1 (Unit-type of (Trained unit)) for Player 12 (Brown) at (Center of Box 2 <gen>) facing 0.00 degrees
-
Unit - Create 1 (Unit-type of (Trained unit)) for Player 12 (Brown) at (Center of Box 3 <gen>) facing 0.00 degrees
-
Unit - Create 1 (Unit-type of (Trained unit)) for Player 12 (Brown) at (Center of Box 4 <gen>) facing 0.00 degrees
-
Unit - Create 1 (Unit-type of (Trained unit)) for Player 12 (Brown) at (Center of Box 5 <gen>) facing 0.00 degrees
-
Unit - Create 1 (Unit-type of (Trained unit)) for Player 12 (Brown) at (Center of Box 6 <gen>) facing 0.00 degrees
-
-
-
-
-
-