• 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] Trigger Not Triggering

Status
Not open for further replies.
Level 1
Joined
Feb 21, 2008
Messages
3
My situation is that I have a map where if ANYONES town hall dies then the game is over for all players. Right now, cancelling a town hall mid-construction ends the game as well. I need a trigger that can accomodate cancelled town halls. I have tried variables (set to 1 when constructing, set to 0 when finished) and using various combinations of triggering unit is not equal to cancelled structure, but nothing has worked up to now.
Any help on how to approach this would be awesome, I'm tapped out!
 
Level 4
Joined
Dec 16, 2007
Messages
134
Try this:

  • Enabler
    • Events
      • Unit - A unit Finishes construction
    • Conditions
      • (Unit-type of (Constructed structure)) Equal to Town Hall
    • Actions
      • Trigger - Turn on Defeat <gen>
  • Defeat
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Town Hall
    • Actions
      • Set PlayerGroup = (All players)
      • Player Group - Pick every player in PlayerGroup and do (Actions)
        • Loop - Actions
          • Game - Defeat (Picked player) with the message: Defeat!
      • Custom script: call DestroyForce(udg_PlayerGroup)
 
Level 1
Joined
Feb 21, 2008
Messages
3
I used the trigger you gave me h3k241, and it works. However, it only works after someone has built another town hall. Since each player starts with a town hall, I can destroy the town hall that I started with and have no problems. (I interpreted your structure to mean that the second trigger is not initially on)
Don't get me wrong, your help is awesome, but do you think you can help me revise it?
Also, tried the scenario where I built one town hall, and then another. I cancelled the third one and the game counted it as defeat.
 
Last edited:
Status
Not open for further replies.
Top