• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Trigger Question.

Status
Not open for further replies.

WUMP4

W

WUMP4

Hey there,

So I'm pretty new to the WCIII editor and have started to make a Tower Defense. I was looking through this tutorial, and have hit a problem. I have everything working just fine except this:

  • Wait until ((All units of (Units owned by Player 12 (Brown)) are dead)Equal to True), checking every 1.00 seconds
I'm not actually sure the steps involved to getting that trigger. I go New Action --> General --> Wait for Condition. After that I'm lost.

Any help would be appreciated, thanks.
 
Hey there,

So I'm pretty new to the WCIII editor and have started to make a Tower Defense. I was looking through this tutorial, and have hit a problem. I have everything working just fine except this:

  • Wait until ((All units of (Units owned by Player 12 (Brown)) are dead)Equal to True), checking every 1.00 seconds
I'm not actually sure the steps involved to getting that trigger. I go New Action --> General --> Wait for Condition. After that I'm lost.

Any help would be appreciated, thanks.
You should try this instead.

  • Unit - A unit Dies
  • (Number of units in (Units owned by Player 12 (Brown))) Less than or equal to 1
  • Game - Victory Player 1 (Red) (Show dialogs, Show scores)
The victory is just an example function.
 
  • Unit - A unit Dies
  • (Number of units in (Units owned by Player 12 (Brown))) Less than or equal to 1
  • Game - Victory Player 1 (Red) (Show dialogs, Show scores)
That would leak a group and actually wouldn't work correctly since it would be counting dead units.
Try this one:
  • Player1Loses
    • Events
      • Unit - A unit owned by Player 1 (Red) Dies
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in (Units owned by Player 1 (Red) matching (((Matching unit) is alive) Equal to True))) Equal to 0
        • Then - Actions
          • Game - Defeat Player 1 (Red) with the message: Defeat!
        • Else - Actions
 
That would leak a group and actually wouldn't work correctly since it would be counting dead units.
Try this one:
  • Player1Loses
    • Events
      • Unit - A unit owned by Player 1 (Red) Dies
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in (Units owned by Player 1 (Red) matching (((Matching unit) is alive) Equal to True))) Equal to 0
        • Then - Actions
          • Game - Defeat Player 1 (Red) with the message: Defeat!
        • Else - Actions
Oh,it leaks? Guess I still have alot to learn on what leaks then lol.
 
Status
Not open for further replies.
Back
Top