• 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 faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Question about Events

Status
Not open for further replies.
Level 7
Joined
Sep 2, 2006
Messages
148
Hi,

I have a question about a certain event.

You know when in warcraft 3 campaigns a base is destroyed, or a group of units.

I have tried it several times, but it always ends with the wrong result.

I hope you can help me out with this
__________
Numeror
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
This checks if all barracks of the owner of the dying unit are dead, or if the player has zero barracks:

  • Untitled Trigger 014
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set Temp_Group_1 = (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Barracks) and ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to (Owner of (Triggering unit))))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Temp_Group_1 is empty) Equal to True
        • Then - Actions
          • Trigger - Run Some trigger <gen> (checking conditions)
        • Else - Actions
      • Custom script: call DestroyGroup(udg_Temp_Group_1)
Modify it to your needs.
 
Level 9
Joined
Dec 12, 2007
Messages
489
then post your trigger...
so people can see what may go wrong in your trigger.

probably, because this part:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ((Picked unit) is dead) Equal to True
    • Then - Actions
    • Else - Actions
picked unit in a group loop is always checked individually, or with your trigger example it will check from each unit in group you define, and then check if that unit is dead; if it is, it will run the action you specified.
so if there are 5 units in your group, and 2 are dead, it will run the action 2 times.
 
Status
Not open for further replies.
Top