• 🏆 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!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

[Solved] This trigger won't work!?

Status
Not open for further replies.
Level 11
Joined
Jun 26, 2014
Messages
504
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
504
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