• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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