Td Wave Problem

LordOfQc

New Member
Reaction score
0
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.

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 (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 (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


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
      • Unit Group - Pick every unit in HideUnitGroup and do (Actions)
        • Loop - Actions
          • Unit - Unhide (Picked unit)
          • Unit Group - Remove all units from HideUnitGroup
      • 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


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:
 

canons200

New Member
Reaction score
50
Trigger:
  • Countdown Timer - Start Timer as a One-shot timer that will expire in 30.00 seconds

is this 1? the second delay you have said.

anyway actually there is no need to run the trigger every 0.01 seconds, because it will create massive lag if your computer can't support, use higher value since the trigger is to spawn creep, it won't be hurt to put every 1 seconds. Or use every 0.03 seconds, the optimum value.
 

LordOfQc

New Member
Reaction score
0
Trigger:
  • Countdown Timer - Start Timer as a One-shot timer that will expire in 30.00 seconds

is this 1? the second delay you have said.

anyway actually there is no need to run the trigger every 0.01 seconds, because it will create massive lag if your computer can't support, use higher value since the trigger is to spawn creep, it won't be hurt to put every 1 seconds. Or use every 0.03 seconds, the optimum value.

Ya i know i changed the event but no its no the 30 sec delay. I have a 30 sec delay when all the creeps are dead before the round start
 

canons200

New Member
Reaction score
50
oh, remove the corpse because they are still counted as unit or lower the corpse duration.
 

LordOfQc

New Member
Reaction score
0
Already have a trigger for this sorry if I didn't say it. Like I said, the trigger works for the wave 1 and 3 but not for 2-4-5-6-7-8 isk why and I checked all my triggers
 

Stringel

New Member
Reaction score
12
On another note you would reduce your code severelly if you set up wave units and wave index in a map init trigger and create only 1 single trigger for the waves (instead of 1 for each wave).
 

LordOfQc

New Member
Reaction score
0
On another note you would reduce your code severelly if you set up wave units and wave index in a map init trigger and create only 1 single trigger for the waves (instead of 1 for each wave).

Good idea, i will do that
 

LordOfQc

New Member
Reaction score
0
Sorry didn't understand what you said, Atcually, it was the corpses, thanks for the help :thup:
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top