• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Creep waves?

Status
Not open for further replies.
Level 11
Joined
Jun 26, 2014
Messages
497
I want to make creep waves like those on TD maps.
What I mean is:

I finish a wave.
To start the 2nd one I need to type "-start"
And for every other wave to type "-start" as well

The problem I'm having is when I type start all of the waves come at once.

Or atleast to have a prep time for the other waves.
 
Level 11
Joined
Jun 26, 2014
Messages
497
  • Spawn w1
    • Events
      • Player - Player 2 (Blue) types a chat message containing -start as An exact match
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Wave one is on the ...
      • Unit - Create 15 Spiderling for Player 11 (Dark Green) at (Center of Spawner <gen>) facing Default building facing degrees
When Player 2(Host) types -start all of the waves come out at once. How do I fix that?
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
Hmm... in the top there should be a checkbox saying "Initially on", un-tick it for every spawn trigger but for the first one.

  • Spawn w1
  • Events
  • Player - Player 2 (Blue) types a chat message containing -start as An exact match
  • Conditions
  • Actions
  • Game - Display to (All players) the text: Wave one is on the ...
  • Unit - Create 15 Spiderling for Player 11 (Dark Green) at (Center of Spawner <gen>) facing Default building facing degrees
  • And add the following 2 lines to each spawn trigger:
  • Trigger - Trun off (This Trigger)
  • Trigger - Turn on NextWaveTrigger


Or a better solution is:

  • InitMap
  • Event
  • Map Initialization
  • Condition
  • Actions
  • Set WaveIndex = 1
  • Set NumberOfUnits[WaveIndex] = 15
  • Set Creep[WaveIndex] = Spider
  • Set WaveIndex = WaveIndex + 1
  • Set NumberOfUnits[WaveIndex] = 17
  • Set Creep[WaveIndex] = Big Spider
  • Set WaveIndex = WaveIndex + 1
  • Set NumberOfUnits[WaveIndex] = 16
  • Set Creep[waveIndex] = Super Spider
  • Set WaveIndex = WaveIndex + 1
  • Set NumberOfUnits[WaveIndex] = 17
  • Set Creep[WaveIndex] = Racoon
  • etc. for all waves.
  • You may make a custom string message for each wave, telling tips & tricks
  • Set WaveIndex = 0
Delete all spawn triggers except one and modify it to this:
  • Spawn wave
  • Events
  • Player - Player 2 (Blue) types a chat message containing -start as An exact match
  • Conditions
  • Actions
  • Set TempPoint = Center of Spawner <gen>
  • WaveIndex = WaveIndex + 1
  • Game - Display to (All players) the text: Wave one is on the ...
  • Unit - Create NumberOfUnits[WaveIndex] Creep[WaveIndex] for Player 11 (Dark Green) at TempPoint facing Default building facing degrees
  • Custom script - call RemoveLocation(udg_TempPoint)
 
Level 6
Joined
May 20, 2014
Messages
228
Isn't it easier to store each unit into an array and then increase the wave array by one whenever a wave is finished? Because it looks like it's overcomplicating just for storing units :S

> I can't do the second one because I don't know how to use variables.

Variables are how you use to store information and call them based on specifics, which makes triggering tons easier. You can familiarize yourself with this tutorial.

We also have tutorials on how to make a TD, like this.
 
Level 11
Joined
Jun 26, 2014
Messages
497
This is wave one:
  • Spawn w1
    • Events
      • Player - Player 2 (Blue) types a chat message containing -start as An exact match
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Wave one is on the ...
      • Unit - Create 15 Stinger for Player 11 (Dark Green) at (Center of Spawner <gen>) facing Default building facing degrees
      • Trigger - Turn off (This trigger)
      • Trigger - Turn on Spawn w2 <gen>
This is wave two:
  • Spawn w2
    • Events
      • Player - Player 2 (Blue) types a chat message containing -start as An exact match
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Wave one is on the ...
      • Unit - Create 25 Stinger for Player 11 (Dark Green) at (Center of Spawner <gen>) facing Default building facing degrees
      • Trigger - Turn off (This trigger)
      • Trigger - Turn on Spawn w3 <gen>
 
Level 6
Joined
May 20, 2014
Messages
228
Honestly making a variable and storing each unit type into arrays is the easiest you can go for than making multiple triggers since you will end up wasting your time and efficiency. I've suggest tutorials, but if you really don't want to bother learning how variables work and how you can use them to your advantage I don't know what else to say :S

The triggers look fine, what does not work? Is it initially off? Are you player red, but the triggers suggest it works for blue only? etc.
 
Level 11
Joined
Jun 26, 2014
Messages
497
Honestly making a variable and storing each unit type into arrays is the easiest you can go for than making multiple triggers since you will end up wasting your time and efficiency. I've suggest tutorials, but if you really don't want to bother learning how variables work and how you can use them to your advantage I don't know what else to say :S

The triggers look fine, what does not work? Is it initially off? Are you player red, but the triggers suggest it works for blue only? etc.

I will check the tutorials tommorrow... thank you for them.
And yes they're initially off and no player red is Computer player. I have made it so that the blue player is the host.

Edit: I actually made it work by doing this
  • Spawn w1
    • Events
      • Player - Player 2 (Blue) types a chat message containing -start as An exact match
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Wave one is on the ...
      • Unit - Create 40 Stinger for Player 11 (Dark Green) at (Center of Spawner <gen>) facing Default building facing degrees
      • Trigger - Turn on wait for w2 <gen>
      • Trigger - Turn off (This trigger)
  • wait for w2
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • Trigger - Turn on Spawn w2 <gen>
      • Trigger - Turn off (This trigger)
And it only takes me about 5 mins to make a wave... just need to make the custom units copy the triggers and just change some of their data. I guess for now I'm okay without variables. Though thanks for the help :p
 
Last edited:
Status
Not open for further replies.
Top