Question about Events

Status
Not open for further replies.
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.
 
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.
Back
Top