Im am making a Td and I have a problem with my wave triggers.
This is my trigger for the Wave 1, the wave 2 is the same.
And this is my trigger to end wave 1 and start wave 2
The triggers work for the wave 1 and 3 but there is a 20-30 seconds delay when all the creep are dead before the end of the round for the wave 2 and 4. I don't know why
I need help please :banghead:
This is my trigger for the Wave 1, the wave 2 is the same.
Trigger:
- Wave 1
- Events
- Time - Timer expires
- Conditions
- Actions
- Trigger - Turn off (This trigger)
- Set Wave = Wave 2 <gen>
- Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Must finish the round)) and do (Unit - Remove (Picked unit) from the game)
- Set WaveNumber = 1
- Set RoundBonus = 10
- Unit - Create 10 Peasant for Player 12 (Brown) at (Center of Red Spawn <gen>) facing 90.00 degrees
- Set WaveUnitGroup[1] = (Units in Red Spawn <gen> owned by Player 12 (Brown))
- Unit - Create 10 Peasant for Player 12 (Brown) at (Center of Blue Spawn <gen>) facing 90.00 degrees
- Set WaveUnitGroup[2] = (Units in Blue Spawn <gen> owned by Player 12 (Brown))
- Unit - Create 10 Peasant for Player 12 (Brown) at (Center of Teal Spawn <gen>) facing 90.00 degrees
- Set WaveUnitGroup[3] = (Units in Teal Spawn <gen> owned by Player 12 (Brown))
- Unit - Create 10 Peasant for Player 12 (Brown) at (Center of Purple Spawn <gen>) facing 90.00 degrees
- Set WaveUnitGroup[4] = (Units in Purple Spawn <gen> owned by Player 12 (Brown))
- Unit - Create 10 Peasant for Player 10 (Light Blue) at (Center of Yellow Spawn <gen>) facing 90.00 degrees
- Set WaveUnitGroup[5] = (Units in Yellow Spawn <gen> owned by Player 10 (Light Blue))
- Unit - Create 10 Peasant for Player 10 (Light Blue) at (Center of Orange Spawn <gen>) facing 90.00 degrees
- Set WaveUnitGroup[6] = (Units in Orange Spawn <gen> owned by Player 10 (Light Blue))
- Unit - Create 10 Peasant for Player 10 (Light Blue) at (Center of Green Green Spawn <gen>) facing 90.00 degrees
- Set WaveUnitGroup[7] = (Units in Green Green Spawn <gen> owned by Player 10 (Light Blue))
- Unit - Create 10 Peasant for Player 10 (Light Blue) at (Center of Pink Spawn <gen>) facing 90.00 degrees
- Set WaveUnitGroup[8] = (Units in Pink Spawn <gen> owned by Player 10 (Light Blue))
- Unit Group - Remove all units from WaveUnitGroup[9]
- Set WaveUnitGroup[9] = (Units in (Entire map) matching (((Owner of (Matching unit)) Equal to Player 12 (Brown)) or ((Owner of (Matching unit)) Equal to Player 10 (Light Blue))))
- Trigger - Turn on Wave Complete <gen>
- Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Unit-type of (Picked unit)) Equal to Chicken Building
- Then - Actions
- Unit - Hide (Picked unit)
- Unit - Create 1 Chicken Unit for (Owner of (Picked unit)) at (Position of (Picked unit)) facing Default building facing degrees
- Unit Group - Add (Last created unit) to UnitCreated
- Unit Group - Add (Picked unit) to HideUnitGroup
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Unit-type of (Picked unit)) Equal to Frog Building
- Then - Actions
- Unit - Hide (Picked unit)
- Unit - Create 1 Frog Unit for (Owner of (Picked unit)) at (Position of (Picked unit)) facing Default building facing degrees
- Unit Group - Add (Last created unit) to UnitCreated
- Unit Group - Add (Picked unit) to HideUnitGroup
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Unit-type of (Picked unit)) Equal to Pig Building
- Then - Actions
- Unit - Hide (Picked unit)
- Unit - Create 1 Pig Unit for (Owner of (Picked unit)) at (Position of (Picked unit)) facing Default building facing degrees
- Unit Group - Add (Last created unit) to UnitCreated
- Unit Group - Add (Picked unit) to HideUnitGroup
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- Events
And this is my trigger to end wave 1 and start wave 2
Trigger:
- Wave Complete
- Events
- Time - Every 0.01 seconds of game time
- Conditions
- (Number of units in WaveUnitGroup[9]) Less than or equal to 2
- Actions
- Unit Group - Remove all units from WaveUnitGroup[1]
- Unit Group - Remove all units from WaveUnitGroup[2]
- Unit Group - Remove all units from WaveUnitGroup[3]
- Unit Group - Remove all units from WaveUnitGroup[4]
- Unit Group - Remove all units from WaveUnitGroup[5]
- Unit Group - Remove all units from WaveUnitGroup[6]
- Unit Group - Remove all units from WaveUnitGroup[7]
- Unit Group - Remove all units from WaveUnitGroup[8]
- Unit Group - Remove all units from WaveUnitGroup[9]
- Trigger - Turn off Teleport Units <gen>
- Trigger - Turn off (This trigger)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Then - Actions
- Unit - Create 1 Must finish the round for Player 1 (Red) at (Center of Must Fnish the Round <gen>) facing Default building facing degrees
- Unit - Create 1 Must finish the round for Player 2 (Blue) at (Center of Must Fnish the Round <gen>) facing Default building facing degrees
- Unit - Create 1 Must finish the round for Player 3 (Teal) at (Center of Must Fnish the Round <gen>) facing Default building facing degrees
- Unit - Create 1 Must finish the round for Player 4 (Purple) at (Center of Must Fnish the Round <gen>) facing Default building facing degrees
- Unit - Create 1 Must finish the round for Player 5 (Yellow) at (Center of Must Fnish the Round <gen>) facing Default building facing degrees
- Unit - Create 1 Must finish the round for Player 6 (Orange) at (Center of Must Fnish the Round <gen>) facing Default building facing degrees
- Unit - Create 1 Must finish the round for Player 7 (Green) at (Center of Must Fnish the Round <gen>) facing Default building facing degrees
- Unit - Create 1 Must finish the round for Player 8 (Pink) at (Center of Must Fnish the Round <gen>) facing Default building facing degrees
- Else - Actions
- Game - Display to (All players) the text: (Wave + ((String(WaveNumber)) + Cleared!))
- Wait 5.00 seconds
- Sound - Play GoodJob <gen>
- Camera - Pan camera for Player 1 (Red) to (Position of Builder[1]) over 1.00 seconds
- Camera - Pan camera for Player 2 (Blue) to (Position of Builder[2]) over 1.00 seconds
- Camera - Pan camera for Player 3 (Teal) to (Position of Builder[3]) over 1.00 seconds
- Camera - Pan camera for Player 4 (Purple) to (Position of Builder[4]) over 1.00 seconds
- Camera - Pan camera for Player 5 (Yellow) to (Position of Builder[5]) over 1.00 seconds
- Camera - Pan camera for Player 6 (Orange) to (Position of Builder[6]) over 1.00 seconds
- Camera - Pan camera for Player 7 (Green) to (Position of Builder[7]) over 1.00 seconds
- Camera - Pan camera for Player 8 (Pink) to (Position of Builder[8]) over 1.00 seconds
- Selection - Select Builder[1] for Player 1 (Red)
- Selection - Select Builder[2] for Player 2 (Blue)
- Selection - Select Builder[3] for Player 3 (Teal)
- Selection - Select Builder[4] for Player 4 (Purple)
- Selection - Select Builder[5] for Player 5 (Yellow)
- Selection - Select Builder[6] for Player 6 (Orange)
- Selection - Select Builder[7] for Player 7 (Green)
- Selection - Select Builder[8] for Player 8 (Pink)
- Unit Group - Pick every unit in UnitCreated and do (Actions)
- Loop - Actions
- Unit - Remove (Picked unit) from the game
- Loop - Actions
- Unit Group - Pick every unit in HideUnitGroup and do (Actions)
- Loop - Actions
- Unit - Unhide (Picked unit)
- Unit Group - Remove all units from HideUnitGroup
- Loop - Actions
- Player - Add Income[1] to Player 1 (Red) Current gold
- Player - Add Income[2] to Player 2 (Blue) Current gold
- Player - Add Income[3] to Player 3 (Teal) Current gold
- Player - Add Income[4] to Player 4 (Purple) Current gold
- Player - Add Income[5] to Player 5 (Yellow) Current gold
- Player - Add Income[6] to Player 6 (Orange) Current gold
- Player - Add Income[7] to Player 7 (Green) Current gold
- Player - Add Income[8] to Player 8 (Pink) Current gold
- Game - Display to Player Group - Player 1 (Red) the text: (Income Bonus : + (String(Income[1])))
- Game - Display to Player Group - Player 2 (Blue) the text: (Income Bonus : + (String(Income[2])))
- Game - Display to Player Group - Player 3 (Teal) the text: (Income Bonus : + (String(Income[3])))
- Game - Display to Player Group - Player 4 (Purple) the text: (Income Bonus : + (String(Income[4])))
- Game - Display to Player Group - Player 5 (Yellow) the text: (Income Bonus : + (String(Income[5])))
- Game - Display to Player Group - Player 6 (Orange) the text: (Income Bonus : + (String(Income[6])))
- Game - Display to Player Group - Player 7 (Green) the text: (Income Bonus : + (String(Income[7])))
- Game - Display to Player Group - Player 8 (Pink) the text: (Income Bonus : + (String(Income[8])))
- Game - Display to (All players) the text: (Round Bonus : + (String(RoundBonus)))
- Player - Add RoundBonus to Player 1 (Red) Current gold
- Player - Add RoundBonus to Player 2 (Blue) Current gold
- Player - Add RoundBonus to Player 3 (Teal) Current gold
- Player - Add RoundBonus to Player 4 (Purple) Current gold
- Player - Add RoundBonus to Player 5 (Yellow) Current gold
- Player - Add RoundBonus to Player 6 (Orange) Current gold
- Player - Add RoundBonus to Player 7 (Green) Current gold
- Player - Add RoundBonus to Player 8 (Pink) Current gold
- Trigger - Turn on Wave
- Countdown Timer - Start Timer as a One-shot timer that will expire in 30.00 seconds
- Events
The triggers work for the wave 1 and 3 but there is a 20-30 seconds delay when all the creep are dead before the end of the round for the wave 2 and 4. I don't know why
I need help please :banghead: