• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

How can I add this trigger?

Status
Not open for further replies.
Level 3
Joined
Jan 16, 2011
Messages
44
Im using this trigger. How can I add this trigger?

  • Event
  • timer expires
  • Actions
  • bj_wantDestroyGroup = true
  • Wait until ((All units of (Units owned by Player 12 (Brown)) are dead)Equal to True), checking every 1.00 seconds
  • Game - Display to (All players) the text: Countdown started...
  • Countdown Timer - Start RoundWindow as a Repeating timer that will expire in 60.00 seconds
  • Set RoundWindow = (Last started timer)
  • Countdown Timer - Create a timer window for (Last started timer) with title Enemy Wave in...

to spawn timer


  • Actions
  • Game - Display to (All players) the text: Countdown started...
  • Countdown Timer - Start RoundWindow as a Repeating timer that will expire in 60.00 seconds
  • Set RoundWindow = (Last started timer)
  • Countdown Timer - Create a timer window for (Last started timer) with title Enemy Wave in...
  • Event
  • Game Initialization
  • Actions
  • Set Lvl_num = 0
  • -------- Level 1 --------
  • Set unit_type[1] = Ghoul
  • Set unit_type_var_two[1] = Troll
  • Set unit_type_var_three[1] = Zombies
  • Set unit_amount[1] = 3
  • Set unit_amount_var_two[1] = 1
  • Set unit_amount_var_three[1] = 1
  • -------- Level 2 --------
  • Set unit_type[2] = Troll
  • Set unit_type_var_two[2] = Ghoul
  • Set unit_type_var_three[2] = Zombies
  • Set unit_amount[2] = 2
  • Set unit_amount_var_two[2] = 2
  • Set unit_amount_var_three[2] = 1
  • -------- Level 3 --------
  • Set unit_type[3] = Zombies
  • Set unit_type_var_two[3] = Troll
  • Set unit_type_var_three[3] = Light Trolls
  • Set unit_amount[3] = 2
  • Set unit_amount_var_two[3] = 2
  • Set unit_amount_var_three[3] = 1
  • ...
  • Timer
    • Events
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Be prepared they ar...
      • Countdown Timer - Start RoundWindow as a Repeating timer that will expire in 60.00 seconds
      • Set RoundWindow = (Last started timer)
      • Countdown Timer - Create a timer window for (Last started timer) with title |c00990000Enemy Wav...
  • Spawn
    • Events
      • Time - RoundWindow expires
    • Conditions
    • Actions
      • Set lvlnum = (lvlnum + 1)
      • Game - Display to (All players) the text: (|c00999900Round + (|c00990000 + ((String(lvlnum)) + (|r + |c00999900has started!|r))))
      • Set loc[1] = (Center of topleft1 <gen>)
      • Set loc[2] = (Center of topleft2 <gen>)
      • Set loc[3] = (Center of topright1 <gen>)
      • Set loc[4] = (Center of topright2 <gen>)
      • Set loc[5] = (Center of bottomleft1 <gen>)
      • Set loc[6] = (Center of bottomleft2 <gen>)
      • Set loc[7] = (Center of jungle <gen>)
      • Set loc[8] = (Center of midmid <gen>)
      • For each (Integer A) from 1 to unit_amount[lvlnum], 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[lvlnum] for Player 12 (Brown) at loc[incrementy] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Center of (Playable map area))
              • Unit - Create 1 unit_type[lvlnum] for Player 12 (Brown) at loc[(incrementy + 1)] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Center of (Playable map area))
              • Set incrementx = (incrementx + 1)
              • Set incrementy = (incrementy + 2)
          • Wait 0.75 seconds
      • For each (Integer A) from 1 to unit_amount_var_three[lvlnum], 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[lvlnum] for Player 12 (Brown) at loc[incrementy] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Center of (Playable map area))
              • Unit - Create 1 unit_type_var_three[lvlnum] for Player 12 (Brown) at loc[(incrementy + 1)] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Center of (Playable map area))
              • Set incrementx = (incrementx + 1)
              • Set incrementy = (incrementy + 2)
          • Wait 0.75 seconds
      • For each (Integer A) from 1 to unit_amount_var_two[lvlnum], 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[lvlnum] for Player 12 (Brown) at loc[incrementy] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Center of (Playable map area))
              • Unit - Create 1 unit_type_var_two[lvlnum] for Player 12 (Brown) at loc[(incrementy + 1)] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Center of (Playable map area))
              • Set incrementx = (incrementx + 1)
              • Set incrementy = (incrementy + 2)
          • Wait 0.75 seconds
      • Custom script: call RemoveLocation( udg_loc[1] )
      • Custom script: call RemoveLocation( udg_loc[2] )
      • Custom script: call RemoveLocation( udg_loc[3] )
      • Custom script: call RemoveLocation( udg_loc[4] )
      • Custom script: call RemoveLocation( udg_loc[5] )
      • Custom script: call RemoveLocation( udg_loc[6] )
      • Custom script: call RemoveLocation( udg_loc[7] )
      • Custom script: call RemoveLocation( udg_loc[8] )
 
Last edited:
Level 8
Joined
Dec 12, 2010
Messages
280
Yes. I mean how can I add that trigger so that it will set the timer to run after all units were dead .

You need an event and condition like this:

  • Start timer
    • Events
      • Unit - A unit owned by Player 12 (Brown) Dies
    • Conditions
      • (Number of units in (Units in (Playable map area) owned by Player 12 (Brown))) Equal to 0
    • Actions
Then list your actions.

I noticed in your first trigger named event that you used the Script Bj_wantDestroyGroup=true
This action should only be used prior to a looping action that refers to a unit group. Which your trigger doesn't appear to use. And try not to use wait actions as they sometimes cause problems with some actions.
 
Status
Not open for further replies.
Top