- Joined
- Jul 29, 2010
- Messages
- 319
Just wondering if there is a more efficient way of doing this, the goal of the trigger is to index all units that will be used in my map as potential enemies and allocate a series of variables. Example being that the variables being used for the "Crawler" are indexed 1 to 20, the crawler is saved under "mutants" with the index of "INTEGER" which constantly increases by 1 per allocation, so this, in turn, creates 20 potential variables for the Crawler unit.
-
Index
-
Events
- Time - Elapsed game time is 0.05 seconds
- Conditions
-
Actions
-
For each (Integer A) from 1 to 20, do (Actions)
-
Loop - Actions
- Set INTEGER = (INTEGER + 1)
- Set Mutants[INTEGER] = Crawler
- Game - Display to (All players) the text: (String(INTEGER))
-
Loop - Actions
-
For each (Integer A) from 1 to 40, do (Actions)
-
Loop - Actions
- Set INTEGER = (INTEGER + 1)
- Set Mutants[INTEGER] = Cyst
- Game - Display to (All players) the text: (String(INTEGER))
-
Loop - Actions
-
For each (Integer A) from 1 to 20, do (Actions)
-
Loop - Actions
- Set INTEGER = (INTEGER + 1)
- Set Mutants[INTEGER] = Slasher
- Game - Display to (All players) the text: (String(INTEGER))
-
Loop - Actions
-
For each (Integer A) from 1 to 5, do (Actions)
-
Loop - Actions
- Set INTEGER = (INTEGER + 1)
- Set Mutants[INTEGER] = Husk
- Game - Display to (All players) the text: (String(INTEGER))
-
Loop - Actions
-
For each (Integer A) from 1 to 5, do (Actions)
-
Loop - Actions
- Set INTEGER = (INTEGER + 1)
- Set Mutants[INTEGER] = Skrake
- Game - Display to (All players) the text: (String(INTEGER))
-
Loop - Actions
-
For each (Integer A) from 1 to 20, do (Actions)
-
Events
-
Spawning
-
Events
- Time - SpawnTimer expires
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in Current_Wave) Less than 30
-
Then - Actions
- Set UnitType = (Random integer number between 1 and 80)
- Unit - Create 1 Mutants[UnitType] for Player 10 (Light Blue) at (Center of REGIONS[(Random integer number between 1 and 8)]) facing Default building facing degrees
- Unit Group - Add all units of (Last created unit group) to Current_Wave
-
Unit Group - Pick every unit in Current_Wave and do (Actions)
-
Loop - Actions
- Unit - Order (Picked unit) to Attack Arcane Summoner 0012 <gen>
-
Loop - Actions
- Countdown Timer - Start SpawnTimer as a One-shot timer that will expire in 0.50 seconds
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events