• 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.

[Trigger] Need a Trigger

Status
Not open for further replies.
Level 4
Joined
Oct 28, 2007
Messages
112
I need a trigger that let Team 1 or 2 win if all heroes of Team 1 or 2 (the heroes of player (Team 1 =1-5) (team 2 6-10)) are dead

so basically

if all heroes of player 1-5 (represents team 1) are dead then victory for team 2

or

if all heroes of player 6-10 (represents team 2) are dead then victory for team 1

got it^^?.. well i hope soem i can help me because ineed this realy need this trigger..:thumbs_up:

i will give rep and credits:thumbs_up:
 
Level 4
Joined
Aug 9, 2004
Messages
70
Here you go, I hope this is what you want...

  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • Set VictoryForTeam2 = True
      • Set VictoryForTeam1 = True
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units owned by (Player((Integer A)))) and do (If ((All units of (Units owned by (Player((Integer A))) matching (((Unit-type of (Matching unit)) is A Hero) Equal to True)) are dead) Not equal to True) then do (Set VictoryForTeam2 = False) else do (Do nothing))
          • Unit Group - Pick every unit in (Units owned by (Player(((Integer A) + 5)))) and do (If ((All units of (Units owned by (Player(((Integer A) + 5))) matching (((Unit-type of (Matching unit)) is A Hero) Equal to True)) are dead) Not equal to True) then do (Set VictoryForTeam1 = False) else do (Do nothing))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • VictoryForTeam1 Equal to True
        • Then - Actions
          • For each (Integer A) from 1 to 5, do (Actions)
            • Loop - Actions
              • Game - Victory (Player((Integer A))) (Show dialogs, Show scores)
              • Game - Defeat (Player(((Integer A) + 5))) with the message: Defeat!
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • VictoryForTeam2 Equal to True
        • Then - Actions
          • For each (Integer A) from 6 to 10, do (Actions)
            • Loop - Actions
              • Game - Victory (Player((Integer A))) (Show dialogs, Show scores)
              • Game - Defeat (Player(((Integer A) - 5))) with the message: Defeat!
        • Else - Actions
 
Level 28
Joined
Mar 25, 2008
Messages
2,955
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • Set VictoryForTeam2 = True
      • Set VictoryForTeam1 = True
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units owned by (Player((Integer A)))) and do (If ((All units of (Units owned by (Player((Integer A))) matching (((Unit-type of (Matching unit)) is A Hero) Equal to True)) are dead) Not equal to True) then do (Set VictoryForTeam2 = False) else do (Do nothing))
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units owned by (Player(((Integer A) + 5)))) and do (If ((All units of (Units owned by (Player(((Integer A) + 5))) matching (((Unit-type of (Matching unit)) is A Hero) Equal to True)) are dead) Not equal to True) then do (Set VictoryForTeam1 = False) else do (Do nothing))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • VictoryForTeam1 Equal to True
        • Then - Actions
          • For each (Integer A) from 1 to 5, do (Actions)
            • Loop - Actions
              • Game - Victory (Player((Integer A))) (Show dialogs, Show scores)
              • Game - Defeat (Player(((Integer A) + 5))) with the message: Defeat!
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • VictoryForTeam2 Equal to True
        • Then - Actions
          • For each (Integer A) from 6 to 10, do (Actions)
            • Loop - Actions
              • Game - Victory (Player((Integer A))) (Show dialogs, Show scores)
              • Game - Defeat (Player(((Integer A) - 5))) with the message: Defeat!
        • Else - Actions
just some leaks cleaned
 
Level 12
Joined
Apr 26, 2008
Messages
830
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • Set VictoryForTeam2 = True
      • Set VictoryForTeam1 = True
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units owned by (Player((Integer A)))) and do (If ((All units of (Units owned by (Player((Integer A))) matching (((Unit-type of (Matching unit)) is A Hero) Equal to True)) are dead) Not equal to True) then do (Set VictoryForTeam2 = False) else do (Do nothing))
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units owned by (Player(((Integer A) + 5)))) and do (If ((All units of (Units owned by (Player(((Integer A) + 5))) matching (((Unit-type of (Matching unit)) is A Hero) Equal to True)) are dead) Not equal to True) then do (Set VictoryForTeam1 = False) else do (Do nothing))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • VictoryForTeam1 Equal to True
        • Then - Actions
          • For each (Integer A) from 1 to 5, do (Actions)
            • Loop - Actions
              • Game - Victory (Player((Integer A))) (Show dialogs, Show scores)
              • Game - Defeat (Player(((Integer A) + 5))) with the message: Defeat!
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • VictoryForTeam2 Equal to True
        • Then - Actions
          • For each (Integer A) from 6 to 10, do (Actions)
            • Loop - Actions
              • Game - Victory (Player((Integer A))) (Show dialogs, Show scores)
              • Game - Defeat (Player(((Integer A) - 5))) with the message: Defeat!
        • Else - Actions
just some leaks cleaned


if you make a trigger and send him the map would be better
 
Last edited:
Status
Not open for further replies.
Top