• 🏆 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 Spawn Help. Start timer after all creeps die.

Status
Not open for further replies.
Level 3
Joined
Jan 16, 2011
Messages
44
Well this is the method I used for spawn. All I want is that the spawn timer will start after all creeps died because this spawn will start immediately when it reaches zero.

the tutorial i followed.

http://www.hiveworkshop.com/forums/...orials-279/multiple-creep-spawn-system-32436/

[WC3]Spawn
Events
Time - RoundWindow expires
Conditions
Actions
Set Lvl_num = (Lvl_num + 1)
For each (Integer A) from 1 to unit_amount[Lvl_num], do (Actions)
Loop - Actions
Set incrementx = 1
Set incrementy = 1
For each (Integer B) from 1 to 4, do (Actions)
Loop - Actions
Unit - Create 1 unit_type[Lvl_num] for Player 12 (Brown) at loc[incrementy] facing Default building facing degrees
Unit - Order (Last created unit) to Attack-Move To center of map
Unit - Create 1 unit_type[Lvl_num] for Player 12 (Brown) at loc[(incrementy + 1)] facing Default building facing degrees
Unit - Order (Last created unit) to Attack-Move To center of map Set incrementx = (incrementx + 1)
Set incrementy = (incrementy + 2)
Wait 0.75 seconds
For each (Integer A) from 1 to unit_amount_var_three[Lvl_num], do (Actions)
Loop - Actions
Set incrementx = 1
Set incrementy = 1
For each (Integer B) from 1 to 4, do (Actions)
Loop - Actions
Unit - Create 1 unit_type_var_three[Lvl_num] for Player 12 (Brown) at loc[incrementy] facing Default building facing degrees
Unit - Order (Last created unit) to Attack-Move To center of map
Unit - Create 1 unit_type_var_three[Lvl_num] for Player 12 (Brown) at loc[(incrementy + 1)] facing Default building facing degrees
Unit - Order (Last created unit) to Attack-Move To center of map
Set incrementx = (incrementx + 1)
Set incrementy = (incrementy + 2)
Wait 0.75 seconds
For each (Integer A) from 1 to unit_amount_var_two[Lvl_num], do (Actions)
Loop - Actions
Set incrementx = 1
Set incrementy = 1
For each (Integer B) from 1 to 4, do (Actions)
Loop - Actions
Unit - Create 1 unit_type_var_two[Lvl_num] for Player 12 (Brown) at loc[incrementy] facing Default building facing degrees
Unit - Order (Last created unit) to Attack-Move To center of map
Unit - Create 1 unit_type_var_two[Lvl_num] for Player 12 (Brown) at loc[(incrementy + 1)] facing Default building facing degrees
Unit - Order (Last created unit) to Attack-Move To center of map
Set incrementx = (incrementx + 1)
Set incrementy = (incrementy + 2)
Wait 0.75 seconds[/WC3]
 
Last edited:
Level 13
Joined
Jul 26, 2008
Messages
1,009
Have you tried firing this event only when there are no Units of Type X in Rect/Region/Area or no units of Player X in Rect/Region/Area, doing a periodic check?

Like create a Timer Event that checks every 3 seconds if the region has a player of Nuetral Hostile in it. If the conditions are false, then it fires the respawn timer and turns off. When the Respawn Timer expires and all units are Respawned, the timer that checks the area is turned back on.
 
Level 8
Joined
Dec 12, 2010
Messages
280
Why have a timer at all? You want creeps to spawn when others in region die you need a spawn trigger similar to this.

  • Create Creep1
    • Events
      • Time - Every 10.00 seconds of game time
    • Conditions
      • (Number of units in (Units in Creep Top <gen> owned by Neutral Hostile)) Less than 5
    • Actions
      • Trigger - Run CreepTriggers1[(Random integer number between 0 and 19)] (ignoring conditions)
This action chooses a trigger from a creep table (trigger array) to run, which spawns a random creep.
 
Status
Not open for further replies.
Top