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

Ending game trigger

Status
Not open for further replies.
Level 9
Joined
Oct 6, 2007
Messages
406
How do I do this certain thing:

Actions: Unit Group - Pick every unit in (Units of type Footman) and do (If (((Picked unit) is alive) Equal to True) then do (Game - Defeat Player 1 (Red) with the message: Defeat!) else do (Do nothing))


I've done EVERYTHING except the "Is alive" part. I have a unit picked out. I have the defeat message. Do nothing. Everything but the "is alive" part. HOW do I put that on the trigger?

PS: It's an "If/Then/Else Trigger.
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
It would be easier if you did something like this:

  • Events
    • Game - elapsed game time is 1800 seconds
  • Actions
    • Set TempUnitGroup = Units of type Footman
    • IF TempUnitGroup" is empty (boolean comparison) THEN do (then actions) else do (else actions)
      • Then - Actions
        • Player - defeat player 1(red)
      • Else - Actions
    • Custom Script : call DestroyGroup(udg_TempUnitGroup)
 
Status
Not open for further replies.
Top