Round based wave system problem

Rab

New Member
Reaction score
1
Ok i took a round based wave system off a "td starter kit map" which can be downloaded here http://warcraft3.filefront.com/file/TD_Starter_Kit;95680 and tried to modify it so that after each round(wave of monsters) when everyone has cleared their monsters, all of each player's units will be teleported to the middle which is the shop area then after 45 seconds warp the player's units back then begin the next round.
So i came up with this..
Starting countdown
Code:
RB Start Spawning
    Events
        Time - StartingTimer expires
    Conditions
    Actions
        Countdown Timer - Destroy (Last created timer window)
        [B]Trigger - Run RB Next Round <gen> (checking conditions)[/B]
        Trigger - Turn off (This trigger)
StartingTimer is basically a 45 second timer which was started in another trigger
Code:
RB Next Round
    Events
    Conditions
    Actions
        Set CurrentLevel = (CurrentLevel + 1)
        Set GoldperLevel = (GoldperLevel + 2)
        Set TotalEnemies = (EnemyCount[CurrentLevel] x 10)
        Player Group - Pick every player in (All players matching (((Matching player) slot status) Equal to Is playing)) and do (Player - Add GoldperLevel to (Picked player) Current gold)
        Trigger - Run RB Spawn Monsters <gen> (ignoring conditions)
        Game - Display to (All players) for 10.00 seconds the text: (Level  + ((String(CurrentLevel)) + ( :  + (Name of (Last created unit)))))
        If (EnableWaves Equal to True) then do (Leaderboard - Change the value for Player 12 (Brown) in Leaderboard to CurrentLevel) else do (Do nothing)
        If (EnableWaves Equal to True) then do (Leaderboard - Change the value for Neutral Victim in Leaderboard to TotalEnemies) else do (Do nothing)
        [B]Trigger - Turn on RB Total Enemies <gen>[/B]
Code:
RB Total Enemies
    Events
        Unit - A unit owned by Player 12 (Brown) Dies
    Conditions
    Actions
        Set TotalEnemies = (TotalEnemies - 1)
        Leaderboard - Change the value for Neutral Victim in Leaderboard to TotalEnemies
        If (TotalEnemies Equal to 0) then do [B](Trigger - Run Fetch Units <gen> (checking conditions)) [/B]else do (Do nothing)
        If (TotalEnemies Equal to 0) then do (Trigger - Turn off (This trigger)) else do (Do nothing)
Code:
Fetch Units
    Events
    Conditions
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area) matching ((Owner of (Triggering unit)) Not equal to Player 12 (Brown))) and do (Actions)
            Loop - Actions
                Unit - Move (Picked unit) instantly to (Center of Mid Store Ground <gen>)
        Wait 5.00 seconds
        Trigger - Turn off (This trigger)
        Countdown Timer - Create a timer window for RevolvingTimer with title Till Next Round  
        Countdown Timer - Start RevolvingTimer as a One-shot timer that will expire in 45.00 seconds
        [B]Trigger - Run Return Units <gen> (checking conditions)[/B]
Code:
Return Units
    Events
    Conditions
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area) matching ((Owner of (Triggering unit)) Equal to Player 1 (Red))) and do (Actions)
            Loop - Actions
                Unit - Move (Triggering unit) instantly to (Center of Red Play <gen>)
        Unit Group - Pick every unit in (Units in (Playable map area) matching ((Owner of (Triggering unit)) Equal to Player 2 (Blue))) and do (Actions)
            Loop - Actions
                Unit - Move (Triggering unit) instantly to (Center of Blue Play <gen>)
        Unit Group - Pick every unit in (Units in (Playable map area) matching ((Owner of (Triggering unit)) Equal to Player 3 (Teal))) and do (Actions)
            Loop - Actions
                Unit - Move (Triggering unit) instantly to (Center of Teal Play <gen>)
        Unit Group - Pick every unit in (Units in (Playable map area) matching ((Owner of (Triggering unit)) Equal to Player 4 (Purple))) and do (Actions)
            Loop - Actions
                Unit - Move (Triggering unit) instantly to (Center of Purple Play <gen>)
        Unit Group - Pick every unit in (Units in (Playable map area) matching ((Owner of (Triggering unit)) Equal to Player 5 (Yellow))) and do (Actions)
            Loop - Actions
                Unit - Move (Triggering unit) instantly to (Center of Yellow Play <gen>)
        Unit Group - Pick every unit in (Units in (Playable map area) matching ((Owner of (Triggering unit)) Equal to Player 6 (Orange))) and do (Actions)
            Loop - Actions
                Unit - Move (Triggering unit) instantly to (Center of Orange Play <gen>)
        Wait 5.00 seconds
        Trigger - Turn off (This trigger)
        Trigger - Run On RB Next Round <gen> (checking conditions)
So all these triggers work in like a cycle and just go on but i cant find the mistake..whenever i try to run it,after the first wave starts and i kill all the monsters,my hero doesnt get warped..
Red-Orange Play is the entire play area of each player
Mid Store Ground is the middle shop area
thanks
EDIT*
you do not neccasarily have to modify these triggers any other way to make the system i need as stated above is fine...
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
I think the problem lies in the Pick Every Unit actions. Shouldn't it be Matching unit instead of Triggering unit?
 

Rab

New Member
Reaction score
1
oh i went through it again and got suspicious of the TotalEnemies variable..it wasnt triggered properly thus nothing happened..
EDIT*
one more problem..
apparently using "Unit Group - Pick every unit in (Units in (Playable map area) matching ((Owner of (Picked unit)) Equal to Player 1 (Red))) and do (Actions)
Loop - Actions
Unit - Move (Picked unit) instantly to (Center of Red Play <gen>)"
will not move player 1 red's creeps back to its play area(specific place for each player) because it takes all the units in the map and if one does not meet the "((Owner of (Picked unit)) Equal to Player 1 (Red)))" condition,the loop action will not start...
so how would i change it so that i move all of player 1's units back to its play area?
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
do this:
Trigger:
  • Actions
    • Set Temp_Point = Center of Red Play &lt;gen&gt;
    • Set Temp_Group = Unit in (Units in (Playable map area) matching ((Owner of (Picked unit)) Equal to Player 1 (Red)))
    • Unit Group - Pick every unit in Temp_Group and do actions
      • Loop - Actions
        • Unit - Move (Picked unit) instantly to Temp_Point
    • Custom Script: call DestroyGroup(udg_Temp_Group)
    • Custom Script: call RemoveLocation(udg_Temp_Point)


that should solve your problem and get rid of your leaks, i suggest you read up on a leak tutorial

PS. next time please post your triggers in these tags: [noparse]
Trigger:
  • It goes here
[/noparse]
 
General chit-chat
Help Users
  • 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 The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top