Trigger to Start a new wave for tower defense

Entaiden

New Member
Reaction score
0
I'm trying to make a tower defense, and have everything working, but when i type -start a 2nd time, -start command keeps triggering the first wave of units to come out over and over.

How do i make it so i type -start it will now spawn the 2nd wave?
 

BRUTAL

I'm working
Reaction score
118
Why are you triggering the waves with a player chat event? Or is that just how you want it to be?
Post your triggers so I can try telling you what's wrong.
 

Entaiden

New Member
Reaction score
0
I wanted it to be like legion TD where you can type -start to begin the next wave, but i've changed it to when Enemy runs out of food.

New problem though, I have 3 waves of units to send out, and upon killing wave 1, it will send out wave 2+3 at the same time instead of wave 2, dead, wave 3.

j7QnTwI.png


This works fine, however

WxSW898.png
 

Entaiden

New Member
Reaction score
0
"Round 2" is the same as "Round 3" except with a different unit, problem is they both spawn under the same event, and i don't know the proper condition (first time doing this)
 

Entaiden

New Member
Reaction score
0
Any ideas? just want the Next wave trigger to apply to a certain wave and not every wave, cant balance the game without proper waves
 

BRUTAL

I'm working
Reaction score
118
Hey, I'm back.
As for your issue with wave 2 and 3 beginning at the same time, it is due to not having proper conditions to separate the two waves.
Here's a template for detecting the end of a wave, and how to start the next wave.

8zpb93.jpg

You should be using an integer variable to keep track of the rounds, and then use that variable accordingly.
 

Entaiden

New Member
Reaction score
0
Actually, problem, i copied your setup and after the intial 30 second setup wait, Footman spawn, then it instantly says wave cleared. It seems to be ignoring the "Event: Player Brown food equal to zero" Part.

sl4hQsr.png


pptfAIV.png


fYR50Pj.png


There was a part in the first picture which told it to run "New Round" but its taken out in the picture, right now after footman nothing happens when they die
 

BRUTAL

I'm working
Reaction score
118
Yea my fault, I should have made it include wave 1, I hopeful that there wouldn't be an conflicts.
The spawn trigger needs to be changed so it includes the first wave, and then you'll just have to run it from the initialization trigger instead of directly spawning the units in that trigger.
I'll post the fix in minute.
rc0g0p.jpg

Also I noticed in the spawn wave trigger, you were making it run the trigger that detects the end of the wave. That part wasn't necessary, and would cause issues if you left it in.
Edit: Oh wait, that was the problem you were describing. :p The wave-ended detection trigger will execute once brown's food becomes 0, so by running this trigger within the spawn wave trigger, you were making it execute early, in a sense.

This is up to you, but you can simplify the game message part by using variables like in my example. This way you don't need to make messages that are displayed only when Round is equal to a specific wave.
Also, if you store each wave's unit type in a variable and set the values in the initialization trigger, it would be easier to display the type of unit each round, as per my example.
 

BRUTAL

I'm working
Reaction score
118
I'm assuming you know how to use the Variables part of the trigger editor.
Well just open the variables window, and then create a new variable.
From the variable type drop box, scroll all the way and you will see Unit Type.
Also you'll have to give the variable an array, so check off the box which has "array" to the right.
After you've named it and finished creating the variable, you just set the variable (add a new action, then press the 's' key to access it quickly, then from there select the variable, and then you'll have to set the index since it has an array and then repeat this for each wave/unit type).
 

Entaiden

New Member
Reaction score
0
Copied everything and its still having the same problem of Not doing anything after wave 1

Q95sdOn.png


P41ZPPZ.png


Vo56Bop.png


Sorry for the blue lines, snipping tool fail
 

BRUTAL

I'm working
Reaction score
118
Look the event you have in Wave Ends.
Max food refers to how much food you have available to provide for units.
Food refers to how much of the max food is currently used.
Max food usually is initially 0, and will only increase when you build something like a farm, or moon well.
It won't trigger because brown will never have max food equal 1 (or anything other than 0).
It needs to be like this.
Trigger:
  • Player - Player 12 (Brown)'s Food used becomes Equal to 0.00
 

Entaiden

New Member
Reaction score
0
Sorry, those pictures were after i messed around with that setting, i changed to Food used becomes equal to zero, still no effect after first wave :/
 

BRUTAL

I'm working
Reaction score
118
I'm thinking you have some kind of pre-placed unit for brown (player 12).
Is there anything that you can think of that would cause brown to have food from units other than what you spawn?
Perhaps try temporarily changing the spawned units to Neutral Hostile, and then change the event to detect when Neutral Hostile's food becomes 0, and see if that changes anything.
I'll look over the triggers again to make sure it's nothing on my end.

Edit: Yea, i just tested my triggers in game and everything is working as intended.
The latest triggers you posted (excluding that one event problem from earlier) are all as they should be, so I believe brown has food from something, and and causes the detection system to break.
 

Entaiden

New Member
Reaction score
0
Derp, i changed Footmans food output to zero in the object editor, it all works. thanks ^^
 
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
    +1
  • 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