• 🏆 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!

[General] Need help with unit wave

Status
Not open for further replies.
Level 4
Joined
Dec 16, 2013
Messages
84
hello everyone
first, sorry for my english

so i'm making a map simillar to 300 spartan, but not that simillar
i'm confused with the unit wave and some stuffs

here is my plan

1. all player pick a hero to begin play with
2. after that, there is a timer that counts down the unit wave, like "round will start in 30 secs"
3. then a mass of unit spawn, example a bunch of murlock

here is the confusing part
4. after the first wave finished i want to set a time like "prepare yourself, round 2 will come in 5secs)
5. then a mass of unit spawn, but different unit like footman, and so. Every round has different unit

i'm not really new at word editor, but i still can't figure it out haha
can somebody teach me how to do the 4 & 5 ?

thanks
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
You first need to set the enemies into a variable. You can add as many units (waves) into this variable that you want.

  • Set Enemies
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set EnemyTypes[EnemyTypeCounter] = Murloc Tiderunner
      • Set EnemyTypeCounter = (EnemyTypeCounter + 1)
      • Set EnemyTypes[EnemyTypeCounter] = Footman
      • Set EnemyTypeCounter = (EnemyTypeCounter + 1)
      • Set EnemyTypes[EnemyTypeCounter] = Knight
      • -------- Remember to set the wavecounter back to 1 once you finish --------
      • Set EnemyTypeCounter = 1
When you spawn the units, you use the variable that you set in the "Set Enemies" trigger. The array is the "EnemyTypeCounter". This integer refers to the current wave.

  • Spawn Enemies
    • Events
      • Time - WaveTimer expires
    • Conditions
    • Actions
      • -------- Setting the position to prevent leak --------
      • Set TempPoint = (Center of Spawn Enemies <gen>)
      • -------- Message tells player which wave it is --------
      • Game - Display to (All players) for 30.00 seconds the text: (Round: + (String(EnemyTypeCounter)))
      • -------- Create the units (Unit type set in other trigger) --------
      • Unit - Create 10 EnemyTypes[EnemyTypeCounter] for Player 12 (Brown) at TempPoint facing Default building facing degrees
      • Custom script: call RemoveLocation (udg_TempPoint)
      • -------- Set the counter to the next round --------
      • Set EnemyTypeCounter = (EnemyTypeCounter + 1)
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
You need an understand how to use variables. Read and practice using variables before continuing. Good luck making any map without using variables. They're needed for everything.

Here is a tutorial which explains how variables and variable arrays work: http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/variables-5896/

Once you understand that, we can make our trigger. To make different unit's spawn on each wave, we must set the unit types for each wave into a single variable. The variable "EnemyTypes" will have every type of unit saved into it. Each array will be a different wave.

EnemyTypes[1] (Array number 1) will be our wave 1
EnemyTypes[2] (Array number 2) will be our wave 2
EnemyTypes[3] (Array number 3) will be our wave 3, and so on.

This first trigger will do exactly that. We will set each unit type into the variable. Map Initialization means this trigger will run while your map is being loaded.

  • Set Enemies
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set EnemyTypes[1] = Murloc Tiderunner
      • Set EnemyTypes[2] = Footman
      • Set EnemyTypes[3] = Knight
      • Set EnemyTypeCounter = 1
The second trigger is the trigger that actually makes the units. Now instead of making a Murloc, or making a footmen, we will make an "EnemyType" (our variable). What unit gets created will depend on what wave number it is.

When selecting which array to use (which wave number to use), we will refer to the Integer type of variable we created. This integer will simply keep track of which wave were up to. After making units, the trigger will set the integer (EnemyTypeCounter) to the next round. That is the number of the current wave + 1.

  • Spawn Enemies
    • Events
      • Time - WaveTimer expires
    • Conditions
    • Actions
      • Unit - Create 10 EnemyTypes[EnemyTypeCounter] for Player 12 (Brown) at (Center of Spawn Enemies) facing Default building facing degrees
      • Set EnemyTypeCounter = (EnemyTypeCounter + 1)
If you still don't understand, you should probably start making smaller more basic maps so you can work on your knowledge.
 
Status
Not open for further replies.
Top