• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Each 5 waves...

Status
Not open for further replies.

Yan

Yan

Level 6
Joined
Aug 20, 2009
Messages
142
I make a survival map, where waves spawn but there is not wave limit so i have difficulties to make this every 5 levels:

wave 1 : 1 unit
wave 2 : 2 units
wave 3 : 3 units
wave 4 : 4 units
wave 5 : 5 units

I hope someone can help me.
thx for reading
Yan
 
Level 8
Joined
Nov 9, 2008
Messages
502
Would be easier if you posed a question rather than a set of circumstances alone.

The easiest way to achieve what you want is to make a global variable called something like 'WaveCounter'.
Each time you run the wave trigger you should increase the WaveCounter by 1.
In the wave trigger put the unit spawning code into a loop.
The loop should exit when it reaches the WaveCounter.
This will make the wave trigger spawn x enemies where x = WaveCounter = how many times the trigger has run before.

I hope that's what you were after.

Example:
  • MakeWave
    • Events
    • Conditions
    • Actions
      • For each (Integer A) from 1 to WaveCounter, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
      • Set WaveCounter = (WaveCounter + 1)
 
  • Like
Reactions: Yan

Yan

Yan

Level 6
Joined
Aug 20, 2009
Messages
142
thx for your answer but your trigger doesn't seem to do what i want.

I give an exemple to be more understood :

wave 1 : 1 unit
wave 2 : 2 units
wave 3 : 3 units
wave 4 : 4 units
wave 5 : 5 units
wave 6 : 1 unit
wave 7 : 2 units
wave 8 : 3 units
wave 9 : 4 units
wave 10 : 5 units
...

but i want it for unlimited waves
 
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

Hmm I hope I got it correct:


  • RunYourWave
    • Events
      • Time - Timer expires
    • Conditions
    • Actions
      • Set Loc = (Center of Region 000 <gen>)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WaveLevel Equal to 5
        • Then - Actions
          • Set WaveLevel = 0
        • Else - Actions
      • Set WaveLevel = (WaveLevel + 1)
      • Unit - Create WaveLevel Footman for Player 1 (Red) at Loc facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_Loc)
At the event I just use a timer for testing it ^^

Greetings
~ The Bomb King > Dr. Boom
 
  • Like
Reactions: Yan
Level 8
Joined
Nov 9, 2008
Messages
502
Yes, use Dr. Boom's condition for resetting the WaveLevel variable as well as my loop and it should work for you.
 
Status
Not open for further replies.
Top