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

[Solved] This trigger won't work!?

Status
Not open for further replies.
Level 11
Joined
Jun 26, 2014
Messages
497
I have a separate trigger that runs this one

  • Lose Condition
    • Events
    • Conditions
    • Actions
      • Set Temp_Group[1] = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Clan Hall))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in Temp_Group[1]) Equal to 1
        • Then - Actions
          • Unit Group - Pick every unit in Temp_Group[1] and do (Actions)
            • Loop - Actions
              • Game - Victory (Owner of (Picked unit)) (Skip dialogs, Show scores)
          • Player Group - Pick every player in PlayerLoserGroup and do (Actions)
            • Loop - Actions
              • Game - Defeat (Picked player) with the message: Game Over.
        • Else - Actions
      • Custom script: call DestroyGroup (udg_Temp_Group[1])
 
Level 11
Joined
Jun 26, 2014
Messages
497
Sorry, you're right, the if condition does not detect it. If I remove the if/then/else it works but when I put the ''(Number of units in Temp_Group[1]) Equal to 1" condition in it stops working. When there is only one player left with a town hall, then that player will win and everyone else in the lose group will lose.

Edit: I fixed it... I had to detect if the units in the group are still alive since it detects dead buildings as well :D
 
Last edited:
Status
Not open for further replies.
Top