• 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] Defeat Trigger Help

Status
Not open for further replies.
Level 7
Joined
Jun 1, 2006
Messages
375
Ok so I'll get right to it. My map has 4 teams of 2 people. Each player buys a unit, and when there unit dies, they lose the game. However if just on player on the team unit dies, then the player with the dead unit just watches his ally play. But when both players on one team unit dies, its defeat. How do I do this! Sorry if you dont understand what i mean, I'm abd at explaining things. Post questions on the concept im tryinfg to get at if you dont understand what i want. thnx
 
Level 7
Joined
Sep 5, 2006
Messages
333
Some hard work later...
use this trigger when your "king" is the only hero
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) owned by (Owner of (Dying unit))) and do (Actions)
        • Loop - Actions
          • Unit - Kill (Picked unit)
then copy this trigger and change the player number
  • Untitled Trigger 002
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
      • ((Number of units in (Units in (Playable map area) matching (((Owner of (Matching unit)) Equal to Player 1 (Red)) and (((Triggering unit) is A Hero) Equal to True)))) + 0) Equal to 0
      • ((Number of units in (Units in (Playable map area) matching (((Owner of (Matching unit)) Equal to Player 2 (Blue)) and (((Triggering unit) is A Hero) Equal to True)))) + 0) Equal to 0
    • Actions
      • Game - Defeat Player 1 (Red) with the message: Defeat!
      • Game - Defeat Player 2 (Blue) with the message: Defeat!
 
Level 7
Joined
Jun 1, 2006
Messages
375
Thank you but as i said there are no heroes, there regular units. So when you put heroes in i can just put "unit"?
 
Status
Not open for further replies.
Top