• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Destroying 2 Town Hall's

Status
Not open for further replies.
Level 5
Joined
Jun 29, 2014
Messages
39
Hello guy's how can I make when Me and my second Ally destroy 2 town hall in enemy team to win, I tried but when I destroy one Town Hall we win because I want to make when we destroy first than second Town Hall to win not only one I want when we both destroy to win like some quest when it say: Kill 2 beast, and than when you kill 2 you finish quest but I want that with Town Hall.
(Sorry for bad english it's not my native language)
 
Last edited:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • unit type of dying unit istown hall
    • Actions
  • set KilledTownHalls[Player number owner of killing unit] = KilledTownHalls + 1
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • KilledTownHalls[player number of owner of killing unit] = 2
      • Then - Actions
        • If - Conditions
        • loop 1-12
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • and
        • if player(A) = ally of owner of killing unit
        • if KilledTownHalls[A] = 2
          • Then
        • Player Group - Pick every player in (All allies of YOU)) and do (Actions)
          • Loop - Actions
            • Game - Victory (Picked player) (Show dialogs, Show scores)
      • Else - Actions
 
  • Victorius
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Town Hall
      • ((Triggering unit) belongs to an enemy of YOU) Equal to True
    • Actions
      • -------- Replaces YOU with either your or your friend slot --------
      • -------- Townhall is an Integer Variable --------
      • Set Townhall = (Townhall + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Townhall Equal to 2
        • Then - Actions
          • Game - Victory YOU (Show dialogs, Show scores)
          • Game - Victory YOURFRIEND (Show dialogs, Show scores)
        • Else - Actions
Should do the job
if the Town Hall is not the human town hall replace
  • (Unit-type of (Triggering unit)) Equal to Town Hall
with
  • ((Triggering unit) is A town-hall-type unit) Equal to True
 
Level 5
Joined
Jun 29, 2014
Messages
39
  • Victorius
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Town Hall
      • ((Triggering unit) belongs to an enemy of YOU) Equal to True
    • Actions
      • -------- Replaces YOU with either your or your friend slot --------
      • -------- Townhall is an Integer Variable --------
      • Set Townhall = (Townhall + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Townhall Equal to 2
        • Then - Actions
          • Game - Victory YOU (Show dialogs, Show scores)
          • Game - Victory YOURFRIEND (Show dialogs, Show scores)
        • Else - Actions
Should do the job
if the Town Hall is not the human town hall replace
  • (Unit-type of (Triggering unit)) Equal to Town Hall
with
  • ((Triggering unit) is A town-hall-type unit) Equal to True

But I have 2 custom town hall: In team alliance: one is human spawner and second night elf spawner and in horde team: one is orc spawner and undead spawner
This is 2v2 map. And I want if alliance detsroy orc and undead than they win and horde will lose and vice versa.
 
Level 5
Joined
Jun 29, 2014
Messages
39
Thank you guys :)
I made it now I will test it. Is this good?

For Horde if Horde destroy human and night elf spawner(town hall):

  • Horde Win
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A town-hall-type unit) Equal to True
      • ((Triggering unit) belongs to an enemy of Player 1 (Red)) Equal to True
      • ((Triggering unit) belongs to an enemy of Player 6 (Orange)) Equal to True
    • Actions
      • Set TownHall = (TownHall + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TownHall Equal to 2
        • Then - Actions
          • Game - Victory Player 1 (Red) (Show dialogs, Show scores)
          • Game - Victory Player 6 (Orange) (Show dialogs, Show scores)
          • Game - Defeat Player 2 (Blue) with the message: Defeat!
          • Game - Defeat Player 5 (Yellow) with the message: Defeat!
          • Trigger - Turn off Wave 1 <gen>
          • Trigger - Turn off Wave 2 <gen>
        • Else - Actions
For Alliance if Alliance destroy orc and undead spawner(town hall):

  • Alliance Win
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A town-hall-type unit) Equal to True
      • ((Triggering unit) belongs to an enemy of Player 2 (Blue)) Equal to True
      • ((Triggering unit) belongs to an enemy of Player 5 (Yellow)) Equal to True
    • Actions
      • Set TownHall = (TownHall + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TownHall Equal to 2
        • Then - Actions
          • Game - Victory Player 2 (Blue) (Show dialogs, Show scores)
          • Game - Victory Player 5 (Yellow) (Show dialogs, Show scores)
          • Game - Defeat Player 1 (Red) with the message: Defeat!
          • Game - Defeat Player 6 (Orange) with the message: Defeat!
          • Trigger - Turn off Wave 1 <gen>
          • Trigger - Turn off Wave 2 <gen>
        • Else - Actions
Edit: Thank you guys I made it :) all works
 
Last edited:
Status
Not open for further replies.
Top