• 🏆 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!

Team Arena Ending trigger isn't working, HELP!

Status
Not open for further replies.
Level 7
Joined
Nov 19, 2007
Messages
253
Hey all,
I made team duels and ending triggers isnt working can someone help?
  • Duel End Forest Arena
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Forest arena <gen> contains (Dying unit)) Equal to True
    • Actions
      • Set DuelGroup[1] = (Units in Forest arena <gen> matching (((Matching unit) belongs to an ally of Player 1 (Red)) Equal to True))
      • Set DuelGroup[2] = (Units in Forest arena <gen> matching (((Matching unit) belongs to an ally of Player 6 (Orange)) Equal to True))
      • Wait 0.50 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in DuelGroup[1]) Equal to 0
        • Then - Actions
          • Trigger - Turn off Duel End Forest Arena2 <gen>
          • Game - Display to (All players) the text: Team 2 wins.
          • Player Group - Pick every player in PlayerT2 and do (Actions)
            • Loop - Actions
              • Player - Add 500 to (Picked player) Current gold
          • Game - Display to (All players) the text: They gets |cffffcc0...
          • Wait 5.00 seconds
          • Countdown Timer - Start DuelTimer as a One-shot timer that will expire in 300.00 seconds
          • Unit Group - Pick every unit in DuelGroup[1] and do (Actions)
            • Loop - Actions
              • Unit - Move (Picked unit) instantly to (Center of Team 1 Spawn <gen>)
              • Selection - Select (Picked unit) for (Owner of (Picked unit))
              • Camera - Pan camera for (Owner of (Picked unit)) to (Position of (Picked unit)) over 0.00 seconds
          • Unit Group - Pick every unit in DuelGroup[2] and do (Actions)
            • Loop - Actions
              • Unit - Move (Picked unit) instantly to (Center of Team 2 Spawn <gen>)
              • Selection - Select (Picked unit) for (Owner of (Picked unit))
              • Camera - Pan camera for (Owner of (Picked unit)) to (Position of (Picked unit)) over 0.00 seconds
          • Unit - Unpause all units
          • Destructible - Close Iron Gate (Vertical) 0378 <gen>
          • Destructible - Close Iron Gate (Vertical) 0375 <gen>
          • Destructible - Close Iron Gate (Horizontal) 0016 <gen>
          • Destructible - Close Iron Gate (Horizontal) 0074 <gen>
          • Trigger - Turn on Creeps Spawn <gen>
          • Trigger - Turn on Revive <gen>
          • Trigger - Turn off Duel Revive <gen>
          • Countdown Timer - Destroy DuelEndTimerWindow
          • Countdown Timer - Pause DuelEndTimer
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in DuelGroup[2]) Equal to 0
        • Then - Actions
          • Trigger - Turn off Duel End Forest Arena2 <gen>
          • Game - Display to (All players) the text: Team 1 wins.
          • Player Group - Pick every player in PlayerT1 and do (Actions)
            • Loop - Actions
              • Player - Add 500 to (Picked player) Current gold
          • Game - Display to (All players) the text: They gets |cffffcc0...
          • Wait 5.00 seconds
          • Countdown Timer - Start DuelTimer as a One-shot timer that will expire in 300.00 seconds
          • Unit Group - Pick every unit in DuelGroup[1] and do (Actions)
            • Loop - Actions
              • Unit - Move (Picked unit) instantly to (Center of Team 1 Spawn <gen>)
              • Selection - Select (Picked unit) for (Owner of (Picked unit))
              • Camera - Pan camera for (Owner of (Picked unit)) to (Position of (Picked unit)) over 0.00 seconds
          • Unit Group - Pick every unit in DuelGroup[2] and do (Actions)
            • Loop - Actions
              • Unit - Move (Picked unit) instantly to (Center of Team 2 Spawn <gen>)
              • Selection - Select (Picked unit) for (Owner of (Picked unit))
              • Camera - Pan camera for (Owner of (Picked unit)) to (Position of (Picked unit)) over 0.00 seconds
          • Unit - Unpause all units
          • Destructible - Close Iron Gate (Vertical) 0378 <gen>
          • Destructible - Close Iron Gate (Vertical) 0375 <gen>
          • Destructible - Close Iron Gate (Horizontal) 0016 <gen>
          • Destructible - Close Iron Gate (Horizontal) 0074 <gen>
          • Trigger - Turn on Creeps Spawn <gen>
          • Trigger - Turn on Revive <gen>
          • Trigger - Turn off Duel Revive <gen>
          • Countdown Timer - Destroy DuelEndTimerWindow
          • Countdown Timer - Pause DuelEndTimer
        • Else - Actions
      • Custom script: call DestroyGroup (udg_DuelGroup[1])
      • Custom script: call DestroyGroup (udg_DuelGroup[2])
  • Duel End Forest Arena2
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set DuelGroup[1] = (Units in Forest arena <gen> matching (((Matching unit) belongs to an ally of Player 1 (Red)) Equal to True))
      • Set DuelGroup[2] = (Units in Forest arena <gen> matching (((Matching unit) belongs to an ally of Player 6 (Orange)) Equal to True))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in DuelGroup[1]) Equal to 0
        • Then - Actions
          • Game - Display to (All players) the text: Team 2 wins.
          • Player Group - Pick every player in PlayerT2 and do (Actions)
            • Loop - Actions
              • Player - Add 500 to (Picked player) Current gold
          • Game - Display to (All players) the text: They gets |cffffcc0...
          • Trigger - Turn off (This trigger)
          • Wait 5.00 seconds
          • Countdown Timer - Start DuelTimer as a One-shot timer that will expire in 300.00 seconds
          • Unit Group - Pick every unit in DuelGroup[1] and do (Actions)
            • Loop - Actions
              • Unit - Move (Picked unit) instantly to (Center of Team 1 Spawn <gen>)
              • Selection - Select (Picked unit) for (Owner of (Picked unit))
              • Camera - Pan camera for (Owner of (Picked unit)) to (Position of (Picked unit)) over 0.00 seconds
          • Unit Group - Pick every unit in DuelGroup[2] and do (Actions)
            • Loop - Actions
              • Unit - Move (Picked unit) instantly to (Center of Team 2 Spawn <gen>)
              • Selection - Select (Picked unit) for (Owner of (Picked unit))
              • Camera - Pan camera for (Owner of (Picked unit)) to (Position of (Picked unit)) over 0.00 seconds
          • Unit - Unpause all units
          • Destructible - Close Iron Gate (Vertical) 0378 <gen>
          • Destructible - Close Iron Gate (Vertical) 0375 <gen>
          • Destructible - Close Iron Gate (Horizontal) 0016 <gen>
          • Destructible - Close Iron Gate (Horizontal) 0074 <gen>
          • Trigger - Turn on Creeps Spawn <gen>
          • Trigger - Turn on Revive <gen>
          • Trigger - Turn off Duel Revive <gen>
          • Countdown Timer - Destroy DuelEndTimerWindow
          • Countdown Timer - Pause DuelEndTimer
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in DuelGroup[2]) Equal to 0
        • Then - Actions
          • Game - Display to (All players) the text: Team 1 wins.
          • Player Group - Pick every player in PlayerT1 and do (Actions)
            • Loop - Actions
              • Player - Add 500 to (Picked player) Current gold
          • Game - Display to (All players) the text: They gets |cffffcc0...
          • Wait 5.00 seconds
          • Trigger - Turn off (This trigger)
          • Countdown Timer - Start DuelTimer as a One-shot timer that will expire in 300.00 seconds
          • Unit Group - Pick every unit in DuelGroup[1] and do (Actions)
            • Loop - Actions
              • Unit - Move (Picked unit) instantly to (Center of Team 1 Spawn <gen>)
              • Selection - Select (Picked unit) for (Owner of (Picked unit))
              • Camera - Pan camera for (Owner of (Picked unit)) to (Position of (Picked unit)) over 0.00 seconds
          • Unit Group - Pick every unit in DuelGroup[2] and do (Actions)
            • Loop - Actions
              • Unit - Move (Picked unit) instantly to (Center of Team 2 Spawn <gen>)
              • Selection - Select (Picked unit) for (Owner of (Picked unit))
              • Camera - Pan camera for (Owner of (Picked unit)) to (Position of (Picked unit)) over 0.00 seconds
          • Unit - Unpause all units
          • Destructible - Close Iron Gate (Vertical) 0378 <gen>
          • Destructible - Close Iron Gate (Vertical) 0375 <gen>
          • Destructible - Close Iron Gate (Horizontal) 0016 <gen>
          • Destructible - Close Iron Gate (Horizontal) 0074 <gen>
          • Trigger - Turn on Creeps Spawn <gen>
          • Trigger - Turn on Revive <gen>
          • Trigger - Turn off Duel Revive <gen>
          • Countdown Timer - Destroy DuelEndTimerWindow
          • Countdown Timer - Pause DuelEndTimer
        • Else - Actions
      • Custom script: call DestroyGroup (udg_DuelGroup[1])
      • Custom script: call DestroyGroup (udg_DuelGroup[2])

  • Duel Ends Forest Arena
    • Events
      • Time - DuelEndTimer expires
    • Conditions
    • Actions
      • Set DuelGroup[1] = (Units in Forest arena <gen> matching (((Matching unit) belongs to an ally of Player 1 (Red)) Equal to True))
      • Set DuelGroup[2] = (Units in Forest arena <gen> matching (((Matching unit) belongs to an ally of Player 6 (Orange)) Equal to True))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in DuelGroup[2]) Greater than (Number of units in DuelGroup[1])
        • Then - Actions
          • Trigger - Turn off Duel End Forest Arena2 <gen>
          • Game - Display to (All players) the text: Team 2 wins.
          • Player Group - Pick every player in PlayerT2 and do (Actions)
            • Loop - Actions
              • Player - Add 500 to (Picked player) Current gold
          • Game - Display to (All players) the text: They gets |cffffcc0...
          • Wait 5.00 seconds
          • Countdown Timer - Start DuelTimer as a One-shot timer that will expire in 300.00 seconds
          • Unit Group - Pick every unit in DuelGroup[1] and do (Actions)
            • Loop - Actions
              • Unit - Move (Picked unit) instantly to (Center of Team 1 Spawn <gen>)
              • Selection - Select (Picked unit) for (Owner of (Picked unit))
              • Camera - Pan camera for (Owner of (Picked unit)) to (Position of (Picked unit)) over 0.00 seconds
          • Unit Group - Pick every unit in DuelGroup[2] and do (Actions)
            • Loop - Actions
              • Unit - Move (Picked unit) instantly to (Center of Team 2 Spawn <gen>)
              • Selection - Select (Picked unit) for (Owner of (Picked unit))
              • Camera - Pan camera for (Owner of (Picked unit)) to (Position of (Picked unit)) over 0.00 seconds
          • Unit - Unpause all units
          • Destructible - Close Iron Gate (Vertical) 0378 <gen>
          • Destructible - Close Iron Gate (Vertical) 0375 <gen>
          • Destructible - Close Iron Gate (Horizontal) 0016 <gen>
          • Destructible - Close Iron Gate (Horizontal) 0074 <gen>
          • Trigger - Turn on Creeps Spawn <gen>
          • Trigger - Turn on Revive <gen>
          • Trigger - Turn off Duel Revive <gen>
          • Countdown Timer - Destroy DuelEndTimerWindow
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in DuelGroup[2]) Less than (Number of units in DuelGroup[1])
        • Then - Actions
          • Trigger - Turn off Duel End Forest Arena2 <gen>
          • Game - Display to (All players) the text: Team 1 wins.
          • Player Group - Pick every player in PlayerT1 and do (Actions)
            • Loop - Actions
              • Player - Add 500 to (Picked player) Current gold
          • Game - Display to (All players) the text: They gets |cffffcc0...
          • Wait 5.00 seconds
          • Countdown Timer - Start DuelTimer as a One-shot timer that will expire in 300.00 seconds
          • Unit Group - Pick every unit in DuelGroup[1] and do (Actions)
            • Loop - Actions
              • Unit - Move (Picked unit) instantly to (Center of Team 1 Spawn <gen>)
              • Selection - Select (Picked unit) for (Owner of (Picked unit))
              • Camera - Pan camera for (Owner of (Picked unit)) to (Position of (Picked unit)) over 0.00 seconds
          • Unit Group - Pick every unit in DuelGroup[2] and do (Actions)
            • Loop - Actions
              • Unit - Move (Picked unit) instantly to (Center of Team 2 Spawn <gen>)
              • Selection - Select (Picked unit) for (Owner of (Picked unit))
              • Camera - Pan camera for (Owner of (Picked unit)) to (Position of (Picked unit)) over 0.00 seconds
          • Unit - Unpause all units
          • Destructible - Close Iron Gate (Vertical) 0378 <gen>
          • Destructible - Close Iron Gate (Vertical) 0375 <gen>
          • Destructible - Close Iron Gate (Horizontal) 0016 <gen>
          • Destructible - Close Iron Gate (Horizontal) 0074 <gen>
          • Trigger - Turn on Creeps Spawn <gen>
          • Trigger - Turn on Revive <gen>
          • Trigger - Turn off Duel Revive <gen>
          • Countdown Timer - Destroy DuelEndTimerWindow
        • Else - Actions
      • Custom script: call DestroyGroup (udg_DuelGroup[1])
      • Custom script: call DestroyGroup (udg_DuelGroup[2])
(Timer Starts in Starting trigger)
 
Last edited:
Level 7
Joined
Nov 19, 2007
Messages
253
First of all i done what you said.
Second, nothing is working when all team dies none is moved outside of arena (sometimes it works sometimes not) trigger2 just spams saying team x won few times but nothing happens and time ending trigger doesnt work at all.. timer ends but nothing happens..
 
Level 9
Joined
Oct 22, 2006
Messages
599
Set DuelGroup[1] = (Units in Forest arena <gen> matching (((Matching unit) belongs to an ally of Player 1 (Red)) Equal to True))
"(Matching unit) belon..." is wrong...
what you should do is "Pick every unit in area, matching condition, (Picked Player)"

You have location leaks, fix them.
"Unit - Move (Picked unit) instantly to (Center of Team 1 Spawn <gen>)"
"Custom script: call RemoveLocation (udg_*VariableName*)"

Besides that I didn't find anything else..
 
Level 7
Joined
Nov 19, 2007
Messages
253
I think that this is rigth: Set DuelGroup[1] = (Units in Forest arena <gen> matching (((Matching unit) belongs to an ally of Player 1 (Red)) Equal to True))
well maybe u know better and thx about location leaks ill try to fix them.
 
Level 7
Joined
Nov 19, 2007
Messages
253
I think you dont understand this or maybe im wrong Set = (Units in Forest arena <gen> matching (((Matching unit) belongs to an ally of Player 1 (Red)) Equal to True))

DuelGroup[1] = variable
Units in Forest arena <gen> = units in area matching Condition
(Matching unit) belongs to an ally of Player 1 (Red) = Condition

maybe you are right at this part but in Trigger editor it says "Use 'Matching unit' to refer to the unit on whom the comparison is being performed."
Maybe the leaking part could cause this trigger stop working properly ?
 
Level 19
Joined
Feb 25, 2009
Messages
2,004
Why not, make the condition with Or - Any condition is true, and check if the dying unit is into one of the specific groups? Also, use (Triggering Unit) ...

You can also make the duel timer repeatable, so you won't need to destroy it everytime, just pause it when it expires and then unpause it when the duel ends.

  • Camera - Pan camera for (Owner of (Picked unit)) to (Position of (Picked unit)) over 0.00 seconds
Leaks, use "Point" veriable when picking the unit, and don't make it "array", you can also add the "Mass Teleport Caster" sfx.

The 5 seconds wait is unneeded here, you can make it 1-2 or remove it entirely. Also both triggers (when a unit dies and the every 1 second one) cannot work together.
 
Status
Not open for further replies.
Top