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

[Trigger] spawn wave trigger

Status
Not open for further replies.
Level 4
Joined
Jun 9, 2008
Messages
86
i have in my map, an 60 sec. timer and every time it finishs i want it to add more units to spawn every time 60 sec.

the trigger i use is :

  • spawn
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
    • Actions
      • Countdown Timer - Start spawn as a Repeating timer that will expire in 60.00 seconds
      • Countdown Timer - Create a timer window for spawn with title Time to next wave
      • Set spawnwindow = (Last created timer window)
      • Countdown Timer - Show spawnwindow
and for the spawn:
  • spawn units
    • Events
      • Time - spawn expires
    • Conditions
    • Actions
      • Unit - Create 5 Attack dog for Player 11 (Dark Green) at (Center of spawn2 <gen>) facing Default building facing degrees
      • Unit - Create 10 GI for Player 11 (Dark Green) at (Center of spawn1 <gen>) facing Default building facing degrees
      • Unit Group - Pick every unit in (Units in spawn2 <gen>) and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack-Move To (Center of attack move 2 <gen>)
      • Unit Group - Pick every unit in (Units in spawn2 <gen>) and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack-Move To (Center of attack move 2 <gen>)
and as you can see in the last one it only spawn the selectet units and not put ekstra units on each wave.

and im not a pro trigger but I hope some one can help me :D
 
Level 15
Joined
Mar 31, 2009
Messages
1,397
You had leaks too so I fixed them. To spawn things like that just put the Starting Spawn # in a variable and after you spawn them, increase the variable.

  • BlargStart
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Set Dog = 5
      • Set GI = 10
  • Blarg
    • Events
      • Time - spawn expires
    • Conditions
    • Actions
      • Set Spawn1 = (Center of (spawn1))
      • Set Spawn2 = (Center of (spawn2))
      • Set AttackMove2 = (Center of (attackmove2))
      • Unit - Create Dog Footman for Player 11 (Dark Green) at (Center of Spawn2) facing Default building facing degrees
      • Set SpawnGroup2 = (Units in Spawn2)
      • Unit - Create GI Footman for Player 11 (Dark Green) at (Center of Spawn1) facing Default building facing degrees
      • Set SpawnGroup1 = (Units in Spawn1)
      • Set Dog = (Dog + 1)
      • Set GI = (GI + 1)
      • Unit Group - Pick every unit in SpawnGroup2 and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Move To (Center of AttackMove2)
      • Unit Group - Pick every unit in SpawnGroup1 and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Move To (Center of AttackMove2)
      • Custom script: call RemoveLocation(udg_Spawn1)
      • Custom script: call RemoveLocation(udg_Spawn2)
      • Custom script: call RemoveLocation(udg_AttackMove2)
      • Custom script: call DestroyGroup(udg_SpawnGroup1)
      • Custom script: call DestroyGroup(udg_SpawnGroup2)
Can I has +rep now.
 
Level 4
Joined
Jun 9, 2008
Messages
86
now a new problem.

i did what you said and it give me this error:
bea29eberror1.png


its error on spawngroup1 and spawn2. its the same error.

here is the trigger:
  • set varibel
    • Events
      • Time - Elapsed game time is 0.05 seconds
    • Conditions
    • Actions
      • Set Dog = 5
      • Set GI = 7
      • Set Mammut = 3
  • spawn units
    • Events
      • Time - spawn expires
    • Conditions
    • Actions
      • Set Spawn1 = spawn1 <gen>
      • Set Spawn2 = spawn2 <gen>
      • Set attackmove2 = attack move 2 <gen>
      • Unit - Create Dog Attack dog for Player 12 (Brown) at (Center of Spawn2) facing Default building facing degrees
      • Set spawngroup2 = (Units in Spawn2)
      • Unit - Create GI GI for Player 12 (Brown) at (Center of Spawn1) facing Default building facing degrees
      • Unit - Create Mammut Apocalypse for Player 12 (Brown) at (Center of Spawn2) facing Default building facing degrees
      • Set spawngroup1 = (Units in Spawn1)
      • Set Dog = (Dog + 3)
      • Set GI = (GI + 2)
      • Set Mammut = (Mammut + 1)
      • Unit Group - Pick every unit in spawngroup2 and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack-Move To (Center of attackmove2)
      • Unit Group - Pick every unit in spawngroup1 and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack-Move To (Center of attackmove2)
      • Custom script: call RemoveLocation(udg_Spawn1)
      • Custom script: call RemoveLocation(udg_Spawn2)
      • Custom script: call RemoveLocation(udg_attackmove2)
      • Custom script: call DestroyGroup(udg_spawngroup1)
      • Custom script: call DestroyGroup(udg_spawngroup2)
 
Level 15
Joined
Mar 31, 2009
Messages
1,397
Rects, Regions

GUI labels them the same >.<

Also, move:
  • Set spawngroup2 = (Units in Spawn2)
To below this:
  • Unit - Create Mammut Apocalypse for Player 12 (Brown) at (Center of Spawn2) facing Default building facing degrees
Otherwise it doesn't include Mammut's in the Unit Group




wtf is a Mammut?
 
Level 4
Joined
Jun 9, 2008
Messages
86
a mammuth is a bigggg tank :D

now the 2 error was corrected but i still get this:


line 128: Invalid argument type (rect)

call DestroyGroup(udg_spawngroup1)

and im pritty n00b in custom scripts... :S
 
Level 4
Joined
Jun 9, 2008
Messages
86
  • test trashcan
    • Events
    • Conditions
    • Actions
      • Custom script: call RemoveRect(udg_Spawn1)
      • Custom script: call RemoveRect(udg_Spawn2)
      • Custom script: call RemoveRect(udg_attackmove2)
      • Custom script: call DestroyGroup(udg_spawngroup1)
      • Custom script: call DestroyGroup(udg_spawngroup2)
this was the custom scripts i used, but it dosen't worked, because secound wave just stood still, so i tryed to remove them and then it worked.

i don't know if it leak, but the trigger looks like this now, and it work, just have to replace the region so there is enough space.:
  • spawn units
    • Events
      • Time - spawn expires
    • Conditions
    • Actions
      • Set Spawn1 = spawn1 <gen>
      • Set Spawn2 = spawn2 <gen>
      • Set attackmove2 = attack move 2 <gen>
      • Unit - Create Dog Attack dog for Player 12 (Brown) at (Center of Spawn2) facing Default building facing degrees
      • Unit - Create GI GI for Player 12 (Brown) at (Center of Spawn1) facing Default building facing degrees
      • Unit - Create Mammut Apocalypse for Player 12 (Brown) at (Center of Spawn2) facing Default building facing degrees
      • Set spawngroup2 = (Units in Spawn2)
      • Set spawngroup1 = (Units in Spawn1)
      • Set Dog = (Dog + 3)
      • Set GI = (GI + 2)
      • Set Mammut = (Mammut + 1)
      • Unit Group - Pick every unit in spawngroup2 and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack-Move To (Center of attackmove2)
      • Unit Group - Pick every unit in spawngroup1 and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack-Move To (Center of attackmove2)
 
Status
Not open for further replies.
Top