Team Duel

Status
Not open for further replies.
Level 7
Joined
Nov 19, 2007
Messages
253
Hey all,
I was trying to make team duel trigger and i'm not that good so i failed. Can someone help me out.. I know basic (1trigger: make timer 2trigger: pick players and move them to arena regions 3trigger: move all units back to playable region) i've tried to search in forum but didn't find anything, can someone help me with 2 ant 3 triggers?
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
can you post the triggers here?

Right click the name of the trigger (In the trigger) and select copy as text

then in the forums paste the triggers in a post and use the [*TRIGGER] [*/TRIGGER] tags please (without the stars: shift+8). The trigger tags can also be found on one of the buttons in the advanced post menu.

This way we can see the problems that you have and help you solve it...
 
Level 7
Joined
Nov 19, 2007
Messages
253
  • Duel Timer
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Countdown Timer - Start DuelTimer as a Repeating timer that will expire in 30.00 seconds
  • Duel Start
    • Events
      • Time - DuelTimer expires
    • Conditions
    • Actions
      • Game - Display to (All players) for 10.00 seconds the text: Duel Time!
      • Countdown Timer - Pause DuelTimer
      • Unit - Pause all units
      • Set DuelChance = (Random integer number between 1 and 2)
      • Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Owner of (Matching unit)) controller) Equal to User) and ((((Owner of (Matching unit)) slot status) Equal to Is playing) and (((Matching unit) belongs to an ally of Player 1 (Red)) Equal to True)))) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • DuelChance Equal to 1
            • Then - Actions
              • Unit - Move (Picked unit) instantly to (Center of City Arena Team1 <gen>)
            • Else - Actions
              • Unit - Move (Picked unit) instantly to (Center of Forest Arena Team1 <gen>)
      • Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Owner of (Matching unit)) controller) Equal to User) and ((((Owner of (Matching unit)) slot status) Equal to Is playing) and (((Matching unit) belongs to an ally of Player 6 (Orange)) Equal to True)))) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • DuelChance Equal to 1
            • Then - Actions
              • Unit - Move (Picked unit) instantly to (Center of City Arena Team2 <gen>)
            • Else - Actions
              • Unit - Move (Picked unit) instantly to (Center of Forest Arena Team2 <gen>)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DuelChance Equal to 1
        • Then - Actions
          • Unit Group - Pick every unit in (Units in City Arena <gen>) and do (Actions)
            • Loop - Actions
              • Unit - Unpause (Picked unit)
              • Unit - Remove All buffs from (Picked unit)
              • Unit - Set life of (Picked unit) to 100.00%
              • Unit - Set mana of (Picked unit) to 100.00%
        • Else - Actions
          • Unit Group - Pick every unit in (Units in Forest arena <gen>) and do (Actions)
            • Loop - Actions
              • Unit - Unpause (Picked unit)
              • Unit - Remove All buffs from (Picked unit)
              • Unit - Set life of (Picked unit) to 100.00%
              • Unit - Set mana of (Picked unit) to 100.00%
      • Wait 5.00 seconds
      • Game - Display to (All players) for 5.00 seconds the text: Duel will start in:
      • Game - Display to (All players) for 5.00 seconds the text: 3!
      • Wait 1.00 seconds
      • Game - Display to (All players) for 5.00 seconds the text: 2!
      • Wait 1.00 seconds
      • Game - Display to (All players) for 5.00 seconds the text: 1!
      • Wait 1.00 seconds
      • Game - Display to (All players) for 5.00 seconds the text: Go!!
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DuelChance Equal to 1
        • Then - Actions
          • Destructible - Open Iron Gate (Vertical) 0378 <gen>
          • Destructible - Open Iron Gate (Vertical) 0375 <gen>
        • Else - Actions
          • Destructible - Open Iron Gate (Horizontal) 0016 <gen>
          • Destructible - Open Iron Gate (Horizontal) 0074 <gen>
I know it still leaks but this thing now works so i need just ending trigger but i don't have any idea how to make it.
 
Last edited:
Level 19
Joined
Feb 25, 2009
Messages
2,004
Why you have most of things twice? 2 loops actions that checks if "Duelchance" is 1, then again one more loop that checks if "Duelchance" is 1 ...
Why you don't remove the actions from the third loop, and place it inside the trigger actions after the loops for the arena choose?
And in the end, the loop again checks if the "Duelchance" is 1 ..
You unpause the units before the duel starts ..
You can filter the players that are in game and place them into an group,
and then filter the units that are alive/heroes/etc and place them in a group too ..
That will make it more good looking and efficientic.

Seriosly, did ever looked at the trigger?
 
Level 7
Joined
Nov 19, 2007
Messages
253
  • Duel Start
    • Events
      • Time - DuelTimer expires
    • Conditions
    • Actions
      • Game - Display to (All players) for 10.00 seconds the text: Duel Time!
      • Countdown Timer - Pause DuelTimer
      • Unit - Pause all units
      • Set DuelChance = (Random integer number between 1 and 2)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DuelChance Equal to 1
        • Then - Actions
          • Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Owner of (Matching unit)) controller) Equal to User) and ((((Owner of (Matching unit)) slot status) Equal to Is playing) and (((Matching unit) belongs to an ally of Player 1 (Red)) Equal to True)))) and do (Actions)
            • Loop - Actions
              • Unit - Move (Picked unit) instantly to (Center of City Arena Team1 <gen>)
              • Unit - Unpause (Picked unit)
              • Unit - Remove All buffs from (Picked unit)
              • Unit - Set life of (Picked unit) to 100.00%
              • Unit - Set mana of (Picked unit) to 100.00%
          • Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Owner of (Matching unit)) controller) Equal to User) and ((((Owner of (Matching unit)) slot status) Equal to Is playing) and (((Matching unit) belongs to an ally of Player 6 (Orange)) Equal to True)))) and do (Actions)
            • Loop - Actions
              • Unit - Move (Picked unit) instantly to (Center of City Arena Team2 <gen>)
              • Unit - Unpause (Picked unit)
              • Unit - Remove All buffs from (Picked unit)
              • Unit - Set life of (Picked unit) to 100.00%
              • Unit - Set mana of (Picked unit) to 100.00%
        • Else - Actions
          • Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Owner of (Matching unit)) controller) Equal to User) and ((((Owner of (Matching unit)) slot status) Equal to Is playing) and (((Matching unit) belongs to an ally of Player 1 (Red)) Equal to True)))) and do (Actions)
            • Loop - Actions
              • Unit - Move (Picked unit) instantly to (Center of Forest Arena Team1 <gen>)
              • Unit - Unpause (Picked unit)
              • Unit - Remove All buffs from (Picked unit)
              • Unit - Set life of (Picked unit) to 100.00%
              • Unit - Set mana of (Picked unit) to 100.00%
          • Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Owner of (Matching unit)) controller) Equal to User) and ((((Owner of (Matching unit)) slot status) Equal to Is playing) and (((Matching unit) belongs to an ally of Player 6 (Orange)) Equal to True)))) and do (Actions)
            • Loop - Actions
              • Unit - Move (Picked unit) instantly to (Center of Forest Arena Team2 <gen>)
              • Unit - Unpause (Picked unit)
              • Unit - Remove All buffs from (Picked unit)
              • Unit - Set life of (Picked unit) to 100.00%
              • Unit - Set mana of (Picked unit) to 100.00%
      • Wait 5.00 seconds
      • Game - Display to (All players) for 5.00 seconds the text: Duel will start in:
      • Game - Display to (All players) for 5.00 seconds the text: 3!
      • Wait 1.00 seconds
      • Game - Display to (All players) for 5.00 seconds the text: 2!
      • Wait 1.00 seconds
      • Game - Display to (All players) for 5.00 seconds the text: 1!
      • Wait 1.00 seconds
      • Game - Display to (All players) for 5.00 seconds the text: Go!!
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DuelChance Equal to 1
        • Then - Actions
          • Destructible - Open Iron Gate (Vertical) 0378 <gen>
          • Destructible - Open Iron Gate (Vertical) 0375 <gen>
        • Else - Actions
          • Destructible - Open Iron Gate (Horizontal) 0016 <gen>
          • Destructible - Open Iron Gate (Horizontal) 0074 <gen>
Is this better?
I unpause units when theyr in duel arena but they cant get out because there are gates so that doesn't means anything.
how to put units in unit group?
 
Level 7
Joined
Nov 19, 2007
Messages
253
  • Duel Start
    • Events
      • Time - DuelTimer expires
    • Conditions
    • Actions
      • Game - Display to (All players) for 10.00 seconds the text: Duel Time!
      • Countdown Timer - Pause DuelTimer
      • Unit - Pause all units
      • Set DuelChance = (Random integer number between 1 and 2)
      • Set DuelGroup[1] = (Units in (Entire map) matching (((((Matching unit) is A Hero) Equal to True) and (((Owner of (Matching unit)) controller) Equal to User)) and ((((Owner of (Matching unit)) slot status) Equal to Is playing) and (((Matching unit) belongs to an ally of Player 1
      • Set DuelGroup[2] = (Units in (Entire map) matching (((((Matching unit) is A Hero) Equal to True) and (((Owner of (Matching unit)) controller) Equal to User)) and ((((Owner of (Matching unit)) slot status) Equal to Is playing) and (((Matching unit) belongs to an ally of Player 6
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DuelChance Equal to 1
        • Then - Actions
          • Unit Group - Pick every unit in DuelGroup[1] and do (Actions)
            • Loop - Actions
              • Unit - Move (Picked unit) instantly to (Center of City Arena Team1 <gen>)
              • Unit - Unpause (Picked unit)
              • Unit - Remove All buffs from (Picked unit)
              • Unit - Set life of (Picked unit) to 100.00%
              • Unit - Set mana of (Picked unit) to 100.00%
          • Unit Group - Pick every unit in DuelGroup[2] and do (Actions)
            • Loop - Actions
              • Unit - Move (Picked unit) instantly to (Center of City Arena Team2 <gen>)
              • Unit - Unpause (Picked unit)
              • Unit - Remove All buffs from (Picked unit)
              • Unit - Set life of (Picked unit) to 100.00%
              • Unit - Set mana of (Picked unit) to 100.00%
        • Else - Actions
          • Unit Group - Pick every unit in DuelGroup[1] and do (Actions)
            • Loop - Actions
              • Unit - Move (Picked unit) instantly to (Center of Forest Arena Team1 <gen>)
              • Unit - Unpause (Picked unit)
              • Unit - Remove All buffs from (Picked unit)
              • Unit - Set life of (Picked unit) to 100.00%
              • Unit - Set mana of (Picked unit) to 100.00%
          • Unit Group - Pick every unit in DuelGroup[2] and do (Actions)
            • Loop - Actions
              • Unit - Move (Picked unit) instantly to (Center of Forest Arena Team2 <gen>)
              • Unit - Unpause (Picked unit)
              • Unit - Remove All buffs from (Picked unit)
              • Unit - Set life of (Picked unit) to 100.00%
              • Unit - Set mana of (Picked unit) to 100.00%
      • Wait 5.00 seconds
      • Game - Display to (All players) for 5.00 seconds the text: Duel will start in:
      • Game - Display to (All players) for 5.00 seconds the text: 3!
      • Wait 1.00 seconds
      • Game - Display to (All players) for 5.00 seconds the text: 2!
      • Wait 1.00 seconds
      • Game - Display to (All players) for 5.00 seconds the text: 1!
      • Wait 1.00 seconds
      • Game - Display to (All players) for 5.00 seconds the text: Go!!
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DuelChance Equal to 1
        • Then - Actions
          • Destructible - Open Iron Gate (Vertical) 0378 <gen>
          • Destructible - Open Iron Gate (Vertical) 0375 <gen>
        • Else - Actions
          • Destructible - Open Iron Gate (Horizontal) 0016 <gen>
          • Destructible - Open Iron Gate (Horizontal) 0074 <gen>
      • Custom script: call DestroyGroup(udg_DuelGroup[1])
      • Custom script: call DestroyGroup(udg_DuelGroup[2])
Like this ?

Can you help me with ending trigger? i don't have any idea how to make it
 
Last edited:
Level 14
Joined
Apr 20, 2009
Messages
1,543
there are still some location leaks:
create a variable called: temp_location

or something like it...

then set it to:
set temp_location = (Center of City Arena Team1 <gen>)
after you used it create this custom script...
call RemoveLocation(udg_temp_location)

Do this also with the following:
set temp_location = (Center of City Arena Team2 <gen>)
call RemoveLocation(udg_temp_location)
set temp_location = (Center of Forest Arena Team1 <gen>)
call RemoveLocation(udg_temp_location)
set temp_location = (Center of Forest Arena Team2 <gen>)
call RemoveLocation(udg_temp_location)


EDIT:
also: you don't have to check if the random int variable is 1 again, you can put it in the same if statement as above...
(behind the unit loops for the then and the else statement... You can open the gates there and the text messages and stuff and then remove the leaks at the end of the trigger)

EDIT:
also: waits are inacurate and a pain in the ass ;)
But since it's only to show when the battle starts it probably isn't that much of a deal, it's not exactly 1 second because it's not acurate :D
but that doesn't matter since it's only indicating when to start the fight...
(if it does matter I suggest using timers instead)
 
Level 7
Joined
Nov 19, 2007
Messages
253
You might want to try this one here.

Nah this is just 1 vs 1 i need team duel.

k i made all duel triggers just need someone to help me test it, can you tell me if theres any more leak points or maybe somethings still wrong?
Heres all triggers:
  • Duel Timer
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Countdown Timer - Start DuelTimer as a One-shot timer that will expire in 300.00 seconds
  • Duel Start
    • Events
      • Time - DuelTimer expires
    • Conditions
    • Actions
      • Set DuelGroup[1] = (Units in (Entire map) matching (((((Matching unit) is A Hero) Equal to True) and (((Owner of (Matching unit)) controller) Equal to User)) and ((((Owner of (Matching unit)) slot status) Equal to Is playing) and (((Matching unit) belongs to an ally of Player 1
      • Set DuelGroup[2] = (Units in (Entire map) matching (((((Matching unit) is A Hero) Equal to True) and (((Owner of (Matching unit)) controller) Equal to User)) and ((((Owner of (Matching unit)) slot status) Equal to Is playing) and (((Matching unit) belongs to an ally of Player 6
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • (Number of units in DuelGroup[1]) Greater than 0
              • (Number of units in DuelGroup[2]) Greater than 0
        • Then - Actions
          • Game - Display to (All players) for 5.00 seconds the text: Duel Time!
          • Set DuelChance = (Random integer number between 1 and 2)
          • Unit - Pause all units
          • Trigger - Turn off Creeps Spawn <gen>
          • Trigger - Turn off Revive <gen>
          • Trigger - Turn on Duel Revive <gen>
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • DuelChance Equal to 1
            • Then - Actions
              • Set CityArenaTeamPoint1 = (Center of City Arena Team1 <gen>)
              • Set CityArenaTeamPoint2 = (Center of City Arena Team2 <gen>)
              • Unit Group - Pick every unit in DuelGroup[1] and do (Actions)
                • Loop - Actions
                  • Unit - Move (Picked unit) instantly to CityArenaTeamPoint1
                  • Unit - Unpause (Picked unit)
                  • Unit - Remove All buffs from (Picked unit)
                  • Unit - Set life of (Picked unit) to 100.00%
                  • Unit - Set mana of (Picked unit) to 100.00%
                  • Selection - Select (Picked unit) for (Owner of (Picked unit))
                  • Camera - Pan camera for (Owner of (Picked unit)) to CityArenaTeamPoint1 over 0.00 seconds
              • Unit Group - Pick every unit in DuelGroup[2] and do (Actions)
                • Loop - Actions
                  • Unit - Move (Picked unit) instantly to CityArenaTeamPoint2
                  • Unit - Unpause (Picked unit)
                  • Unit - Remove All buffs from (Picked unit)
                  • Unit - Set life of (Picked unit) to 100.00%
                  • Unit - Set mana of (Picked unit) to 100.00%
                  • Selection - Select (Picked unit) for (Owner of (Picked unit))
                  • Camera - Pan camera for (Owner of (Picked unit)) to CityArenaTeamPoint2 over 0.00 seconds
              • Custom script: call RemoveLocation (udg_CityArenaTeamPoint1)
              • Custom script: call RemoveLocation (udg_CityArenaTeamPoint2)
            • Else - Actions
              • Set ForestArenaTeamPoint1 = (Center of Forest Arena Team1 <gen>)
              • Set ForestArenaTeamPoint2 = (Center of Forest Arena Team2 <gen>)
              • Unit Group - Pick every unit in DuelGroup[1] and do (Actions)
                • Loop - Actions
                  • Unit - Move (Picked unit) instantly to ForestArenaTeamPoint1
                  • Unit - Unpause (Picked unit)
                  • Unit - Remove All buffs from (Picked unit)
                  • Unit - Set life of (Picked unit) to 100.00%
                  • Unit - Set mana of (Picked unit) to 100.00%
                  • Selection - Select (Picked unit) for (Owner of (Picked unit))
                  • Camera - Pan camera for (Owner of (Picked unit)) to ForestArenaTeamPoint1 over 0.00 seconds
              • Unit Group - Pick every unit in DuelGroup[2] and do (Actions)
                • Loop - Actions
                  • Unit - Move (Picked unit) instantly to ForestArenaTeamPoint2
                  • Unit - Unpause (Picked unit)
                  • Unit - Remove All buffs from (Picked unit)
                  • Unit - Set life of (Picked unit) to 100.00%
                  • Unit - Set mana of (Picked unit) to 100.00%
                  • Selection - Select (Picked unit) for (Owner of (Picked unit))
                  • Camera - Pan camera for (Owner of (Picked unit)) to ForestArenaTeamPoint2 over 0.00 seconds
              • Custom script: call RemoveLocation (udg_ForestArenaTeamPoint1)
              • Custom script: call RemoveLocation (udg_ForestArenaTeamPoint2)
          • Wait 5.00 game-time seconds
          • Game - Display to (All players) for 5.00 seconds the text: Duel will start in:
          • Wait 1.00 game-time seconds
          • Game - Display to (All players) for 5.00 seconds the text: 3!
          • Wait 1.00 game-time seconds
          • Game - Display to (All players) for 5.00 seconds the text: 2!
          • Wait 1.00 game-time seconds
          • Game - Display to (All players) for 5.00 seconds the text: 1!
          • Wait 1.00 game-time seconds
          • Game - Display to (All players) for 5.00 seconds the text: Go!!
          • Countdown Timer - Start DuelEndTimer as a One-shot timer that will expire in 120.00 seconds
          • Set DuelEndTimer = (Last started timer)
          • Countdown Timer - Create a timer window for DuelEndTimer with title Duel Time:
          • Set DuelEndTimerWindow = (Last created timer window)
          • Destructible - Open Iron Gate (Vertical) 0378 <gen>
          • Destructible - Open Iron Gate (Vertical) 0375 <gen>
          • Destructible - Open Iron Gate (Horizontal) 0016 <gen>
          • Destructible - Open Iron Gate (Horizontal) 0074 <gen>
        • Else - Actions
          • Multiboard - Set the text for Multiboard item in column 3, row 12 to (Colour[1] + (((OFF + |r) + (<Empty String> + <Empty String>)) + <Empty String>))
          • Game - Display to (All players) for 5.00 seconds the text: Duel Time! Not e...
          • Trigger - Turn off MB Duel Timer <gen>
          • Trigger - Turn off (This trigger)
      • Custom script: call DestroyGroup (udg_DuelGroup[1])
      • Custom script: call DestroyGroup (udg_DuelGroup[2])
  • 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
          • Unit - Pause all units
          • 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 get |cffffcc00...
          • Unit Group - Pick every unit in DuelGroup[1] and do (Actions)
            • Loop - Actions
              • Set TeamSpawn1 = (Center of Team 1 Spawn <gen>)
              • Unit - Move (Picked unit) instantly to TeamSpawn1
              • Selection - Select (Picked unit) for (Owner of (Picked unit))
              • Camera - Pan camera for (Owner of (Picked unit)) to TeamSpawn1 over 0.00 seconds
              • Custom script: call RemoveLocation (udg_TeamSpawn1)
          • Unit Group - Pick every unit in DuelGroup[2] and do (Actions)
            • Loop - Actions
              • Set TeamSpawn2 = (Center of Team 2 Spawn <gen>)
              • Unit - Move (Picked unit) instantly to TeamSpawn2
              • Selection - Select (Picked unit) for (Owner of (Picked unit))
              • Camera - Pan camera for (Owner of (Picked unit)) to TeamSpawn2 over 0.00 seconds
              • Custom script: call RemoveLocation (udg_TeamSpawn2)
          • 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
          • Wait 5.00 game-time seconds
          • Unit - Unpause all units
          • Countdown Timer - Start DuelTimer as a One-shot timer that will expire in 300.00 seconds
          • Game - Display to (All players) the text: Next duel in 5 minu...
        • 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
          • Unit - Pause all units
          • 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 get |cffffcc00...
          • Unit Group - Pick every unit in DuelGroup[1] and do (Actions)
            • Loop - Actions
              • Set TeamSpawn1 = (Center of Team 1 Spawn <gen>)
              • Unit - Move (Picked unit) instantly to TeamSpawn1
              • Selection - Select (Picked unit) for (Owner of (Picked unit))
              • Camera - Pan camera for (Owner of (Picked unit)) to TeamSpawn1 over 0.00 seconds
              • Custom script: call RemoveLocation (udg_TeamSpawn1)
          • Unit Group - Pick every unit in DuelGroup[2] and do (Actions)
            • Loop - Actions
              • Set TeamSpawn2 = (Center of Team 2 Spawn <gen>)
              • Unit - Move (Picked unit) instantly to TeamSpawn2
              • Selection - Select (Picked unit) for (Owner of (Picked unit))
              • Camera - Pan camera for (Owner of (Picked unit)) to TeamSpawn2 over 0.00 seconds
              • Custom script: call RemoveLocation (udg_TeamSpawn2)
          • 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
          • Wait 5.00 seconds
          • Unit - Unpause all units
          • Countdown Timer - Start DuelTimer as a One-shot timer that will expire in 300.00 seconds
          • Game - Display to (All players) the text: Next duel in 5 minu...
        • 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
          • Unit - Unpause all units
          • 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 get |cffffcc00...
          • Unit Group - Pick every unit in DuelGroup[1] and do (Actions)
            • Loop - Actions
              • Set TeamSpawn1 = (Center of Team 1 Spawn <gen>)
              • Unit - Move (Picked unit) instantly to TeamSpawn1
              • Selection - Select (Picked unit) for (Owner of (Picked unit))
              • Camera - Pan camera for (Owner of (Picked unit)) to TeamSpawn1 over 0.00 seconds
              • Custom script: call RemoveLocation (udg_TeamSpawn1)
          • Unit Group - Pick every unit in DuelGroup[2] and do (Actions)
            • Loop - Actions
              • Set TeamSpawn2 = (Center of Team 2 Spawn <gen>)
              • Unit - Move (Picked unit) instantly to TeamSpawn2
              • Selection - Select (Picked unit) for (Owner of (Picked unit))
              • Camera - Pan camera for (Owner of (Picked unit)) to TeamSpawn2 over 0.00 seconds
              • Custom script: call RemoveLocation (udg_TeamSpawn2)
          • 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
          • Wait 5.00 seconds
          • Unit - Unpause all units
          • Countdown Timer - Start DuelTimer as a One-shot timer that will expire in 300.00 seconds
          • Game - Display to (All players) the text: Next duel in 5 minu...
        • 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
          • Unit - Pause all units
          • 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 get |cffffcc00...
          • Unit Group - Pick every unit in DuelGroup[1] and do (Actions)
            • Loop - Actions
              • Set TeamSpawn1 = (Center of Team 1 Spawn <gen>)
              • Unit - Move (Picked unit) instantly to TeamSpawn1
              • Selection - Select (Picked unit) for (Owner of (Picked unit))
              • Camera - Pan camera for (Owner of (Picked unit)) to TeamSpawn1 over 0.00 seconds
              • Custom script: call RemoveLocation (udg_TeamSpawn1)
          • Unit Group - Pick every unit in DuelGroup[2] and do (Actions)
            • Loop - Actions
              • Set TeamSpawn2 = (Center of Team 2 Spawn <gen>)
              • Unit - Move (Picked unit) instantly to TeamSpawn2
              • Selection - Select (Picked unit) for (Owner of (Picked unit))
              • Camera - Pan camera for (Owner of (Picked unit)) to TeamSpawn2 over 0.00 seconds
              • Custom script: call RemoveLocation (udg_TeamSpawn2)
          • 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
          • Wait 5.00 seconds
          • Unit - Unpause all units
          • Countdown Timer - Start DuelTimer as a One-shot timer that will expire in 300.00 seconds
          • Game - Display to (All players) the text: Next duel in 5 minu...
        • 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 (Number of units in DuelGroup[1])
        • Then - Actions
          • Unit - Unpause all units
          • Game - Display to (All players) the text: Tie.
          • Unit - Pause all units
          • Player Group - Pick every player in PlayerT1 and do (Actions)
            • Loop - Actions
              • Player - Add 250 to (Picked player) Current gold
          • Player Group - Pick every player in PlayerT2 and do (Actions)
            • Loop - Actions
              • Player - Add 250 to (Picked player) Current gold
          • Game - Display to (All players) the text: Both team gets |cff...
          • Unit Group - Pick every unit in DuelGroup[1] and do (Actions)
            • Loop - Actions
              • Set TeamSpawn1 = (Center of Team 1 Spawn <gen>)
              • Unit - Move (Picked unit) instantly to TeamSpawn1
              • Selection - Select (Picked unit) for (Owner of (Picked unit))
              • Camera - Pan camera for (Owner of (Picked unit)) to TeamSpawn1 over 0.00 seconds
              • Custom script: call RemoveLocation (udg_TeamSpawn1)
          • Unit Group - Pick every unit in DuelGroup[2] and do (Actions)
            • Loop - Actions
              • Set TeamSpawn2 = (Center of Team 2 Spawn <gen>)
              • Unit - Move (Picked unit) instantly to TeamSpawn2
              • Selection - Select (Picked unit) for (Owner of (Picked unit))
              • Camera - Pan camera for (Owner of (Picked unit)) to TeamSpawn2 over 0.00 seconds
              • Custom script: call RemoveLocation (udg_TeamSpawn2)
          • 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
          • Wait 5.00 seconds
          • Unit - Unpause all units
          • Countdown Timer - Start DuelTimer as a One-shot timer that will expire in 300.00 seconds
          • Game - Display to (All players) the text: Next duel in 5 minu...
        • Else - Actions
      • Custom script: call DestroyGroup (udg_DuelGroup[1])
      • Custom script: call DestroyGroup (udg_DuelGroup[2])
  • Duel Revive
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Entire map) contains (Dying unit)) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) belongs to an ally of Player 1 (Red)) Equal to True
        • Then - Actions
          • Set TeamSpawn1 = (Center of Team 1 Spawn <gen>)
          • Hero - Instantly revive (Dying unit) at TeamSpawn1, Hide revival graphics
          • Unit - Pause (Dying unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Dying unit)) Equal to Spirit Breaker
            • Then - Actions
              • Animation - Change (Dying unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 40.00% transparency
            • Else - Actions
          • Custom script: call RemoveLocation (udg_TeamSpawn1)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) belongs to an ally of Player 1 (Red)) Equal to False
        • Then - Actions
          • Set TeamSpawn2 = (Center of Team 2 Spawn <gen>)
          • Hero - Instantly revive (Dying unit) at TeamSpawn2, Hide revival graphics
          • Unit - Pause (Dying unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Dying unit)) Equal to Spirit Breaker
            • Then - Actions
              • Animation - Change (Dying unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 40.00% transparency
            • Else - Actions
          • Custom script: call RemoveLocation (udg_TeamSpawn2)
        • Else - Actions
 
Last edited:
Level 7
Joined
Nov 19, 2007
Messages
253
Maybe 2 same triggers with "Unit - A unit Dies" and "Time - DuelEndTimer expires
" Event's causing this error, because i just tested and just revive was working and moving for winners team and when duel ended noone get gold and after timed ending gold was given to all players few times why is this happening?

And one more question: can i use these
  • Set PlayerT1 = (All players matching (((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing)) and (((Matching player) is an ally of Player 1 (Red)) Equal to True)))
  • Set PlayerT2 = (All players matching (((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing)) and (((Matching player) is an ally of Player 6 (Orange)) Equal to True)))
in map initialization and then later use them in other triggers and when player leaves just use
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ((Triggering player) is an ally of Player 1 (Red)) Equal to True
    • Then - Actions
      • Player Group - Remove (Triggering player) from PlayerT1
    • Else - Actions
      • Player Group - Remove (Triggering player) from PlayerT2
to remove player from that group.
Will this work without leaks, etc... ?
 
Sorry. Well basicly leaks should be cleaned.
However, its mostly about local variables which are not used anymore.
Since you use a global variable that could easily be used again, its not worth cleaning it if you might want to use it again.

Cleaning actually means you have no need for that value anymore and need to destroy the whole stuff from the memory.
Its like destroying the variable. And you really don't need to destroy the force variable, why would you?
 
Level 7
Joined
Nov 19, 2007
Messages
253
So the point is that this works fine?
And i dont want to clean this variable because i use it in other triggers.
 
Status
Not open for further replies.
Top