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

Help with triggers

Status
Not open for further replies.
Level 2
Joined
Jan 31, 2008
Messages
21
i am making an arena with four teams, what i want is if the town hall of the enemy is destoryed, the enemy automatically loses the game, because there are 4 teams. After killing the opponent, the killer dont win until he kills all three enemies.

Is there a way where this can be made by triggers.

if possible, please precisely tell me the event, conditon and action. THANKS ALOT!!!
 
Level 7
Joined
Aug 5, 2005
Messages
218
  • Castle
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Castle
    • Actions
      • Game - Defeat (Owner of (Triggering unit)) with the message: Defeat!
  • Victory
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Castle
    • Actions
      • For each (Integer A) from 1 to 4, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Killing unit)) Not equal to (Player((Integer A)))
              • (Castle[(Integer A)] is alive) Equal to True
            • Then - Actions
              • Skip remaining actions
            • Else - Actions
      • Game - Victory (Owner of (Killing unit)) (Show dialogs, Skip scores)
"Castle" is an array unit variable, with player 1's castle set to Castle[1], player 2's castle set to Castle[2], etc.
 
Status
Not open for further replies.
Top