AgentPaper
From the depths, I come.
- Reaction score
- 107
In my TD all my level creep units are made named for their level, like level 1, level 2, level 3, etc up to 50. i made a trigger to make them based off a variable array that kept the level remembered, then used this trigger to put the units in the array
it runs at initialization with 2 other actions.
then i have another trigger to spawn the units in the array, based on the level.
(sorry for the large size)
now when i test the map the timer gets to 0, then restarts like its supposed to but it doesnt span the levels! please help. (will give rep, always do)
Code:
For each (Integer A) from 1 to 50, do (Actions)
Loop - Actions
Set LevelUnit[(Integer A)] = (Unit-type((Level + (String((Integer A))))))
then i have another trigger to spawn the units in the array, based on the level.
Code:
Spawn Levels
Events
Time - Timer expires
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 1 (Red) slot status) Equal to Is playing
Then - Actions
For each (Integer Level) from 1 to 50, do (Actions)
Loop - Actions
Unit - Create 10 LevelUnit[(Integer A)] for Player 11 (Dark Green) at (Player 1 (Red) start location) facing 0.00 degrees
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 2 (Blue) slot status) Equal to Is playing
Then - Actions
For each (Integer Level) from 1 to 50, do (Actions)
Loop - Actions
Unit - Create 10 LevelUnit[(Integer A)] for Player 12 (Brown) at (Player 2 (Blue) start location) facing 0.00 degrees
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 3 (Teal) slot status) Equal to Is playing
Then - Actions
For each (Integer Level) from 1 to 50, do (Actions)
Loop - Actions
Unit - Create 10 LevelUnit[(Integer A)] for Player 11 (Dark Green) at (Player 3 (Teal) start location) facing 0.00 degrees
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 4 (Purple) slot status) Equal to Is playing
Then - Actions
For each (Integer Level) from 1 to 50, do (Actions)
Loop - Actions
Unit - Create 10 LevelUnit[(Integer A)] for Player 12 (Brown) at (Player 4 (Purple) start location) facing 0.00 degrees
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 5 (Yellow) slot status) Equal to Is playing
Then - Actions
For each (Integer Level) from 1 to 50, do (Actions)
Loop - Actions
Unit - Create 10 LevelUnit[(Integer A)] for Player 11 (Dark Green) at (Player 5 (Yellow) start location) facing 0.00 degrees
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 6 (Orange) slot status) Equal to Is playing
Then - Actions
For each (Integer Level) from 1 to 50, do (Actions)
Loop - Actions
Unit - Create 10 LevelUnit[(Integer A)] for Player 12 (Brown) at (Player 6 (Orange) start location) facing 0.00 degrees
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 7 (Green) slot status) Equal to Is playing
Then - Actions
For each (Integer Level) from 1 to 50, do (Actions)
Loop - Actions
Unit - Create 10 LevelUnit[(Integer A)] for Player 11 (Dark Green) at (Player 7 (Green) start location) facing 0.00 degrees
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 8 (Pink) slot status) Equal to Is playing
Then - Actions
For each (Integer Level) from 1 to 50, do (Actions)
Loop - Actions
Unit - Create 10 LevelUnit[(Integer A)] for Player 12 (Brown) at (Player 8 (Pink) start location) facing 0.00 degrees
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 9 (Gray) slot status) Equal to Is playing
Then - Actions
For each (Integer Level) from 1 to 50, do (Actions)
Loop - Actions
Unit - Create 10 LevelUnit[(Integer A)] for Player 11 (Dark Green) at (Player 9 (Gray) start location) facing 0.00 degrees
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 10 (Light Blue) slot status) Equal to Is playing
Then - Actions
For each (Integer Level) from 1 to 50, do (Actions)
Loop - Actions
Unit - Create 10 LevelUnit[(Integer A)] for Player 12 (Brown) at (Player 10 (Light Blue) start location) facing 0.00 degrees
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Level Equal to 1
Then - Actions
Environment - Create at (Playable map area) the weather effect Northrend Snow (Light)
Environment - Turn (Last created weather effect) On
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Level Equal to 25
Then - Actions
Environment - Remove (Last created weather effect)
Environment - Create at (Playable map area) the weather effect Northrend Snow (Heavy)
Environment - Turn (Last created weather effect) On
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Level Equal to 25
Then - Actions
Environment - Remove (Last created weather effect)
Environment - Create at (Playable map area) the weather effect Northrend Blizzard
Environment - Turn (Last created weather effect) On
Else - Actions
Set Level = (Level + 1)
Trigger - Run Set Difficulty <gen> (ignoring conditions)
Trigger - Run Move <gen> (ignoring conditions)
now when i test the map the timer gets to 0, then restarts like its supposed to but it doesnt span the levels! please help. (will give rep, always do)


