I have a map currently running one fully functioning duel which manipulates all units on the map forcing one vs one duel and ends it once one dies. That same map now runs a team duel which pauses all units, brings all heroes to a team duel area, unpauses all units, and allows the players to duke it out. What I cannot seem to get the map to do is the following:
*End the duel once one team has won and send the winners home.
*Remove the team duel timer after each respective team duel and it posts a new one.
*Pause the dead heroes until the duel has finished
*Make sure only one duel timer is running at one time: Team Duel timer begins after Leaders' duel ends. Leaders' duel time begins after Team Duel ends.
-----------------------------------------------------------------------------
----------------------------------------------------------------------
-------------------------------------------------------------------------
------------------------------------------------------------------------
-----------------------------------------------------------------------
*End the duel once one team has won and send the winners home.
*Remove the team duel timer after each respective team duel and it posts a new one.
*Pause the dead heroes until the duel has finished
*Make sure only one duel timer is running at one time: Team Duel timer begins after Leaders' duel ends. Leaders' duel time begins after Team Duel ends.
-----------------------------------------------------------------------------
Code:
Setup Team Duel Timer
Events
Time - Duel expires
Conditions
Team1Dying Equal to False
Team2Dying Equal to False
Actions
Set Team2Number = (Number of players in (All allies of Player 7 (Green)))
Set Team1Number = (Number of players in (All allies of Player 1 (Red)))
If ((Player 1 (Red) slot status) Not equal to Is playing) then do (Player Group - Remove Player 1 (Red) from Team1) else do (Do nothing)
If ((Player 2 (Blue) slot status) Not equal to Is playing) then do (Player Group - Remove Player 2 (Blue) from Team1) else do (Do nothing)
If ((Player 3 (Teal) slot status) Not equal to Is playing) then do (Player Group - Remove Player 3 (Teal) from Team1) else do (Do nothing)
If ((Player 4 (Purple) slot status) Not equal to Is playing) then do (Player Group - Remove Player 4 (Purple) from Team1) else do (Do nothing)
If ((Player 5 (Yellow) slot status) Not equal to Is playing) then do (Player Group - Remove Player 5 (Yellow) from Team1) else do (Do nothing)
If ((Player 6 (Orange) slot status) Not equal to Is playing) then do (Player Group - Remove Player 6 (Orange) from Team1) else do (Do nothing)
If ((Player 7 (Green) slot status) Not equal to Is playing) then do (Player Group - Remove Player 7 (Green) from Team2) else do (Do nothing)
If ((Player 8 (Pink) slot status) Not equal to Is playing) then do (Player Group - Remove Player 8 (Pink) from Team2) else do (Do nothing)
If ((Player 9 (Gray) slot status) Not equal to Is playing) then do (Player Group - Remove Player 9 (Gray) from Team2) else do (Do nothing)
If ((Player 10 (Light Blue) slot status) Not equal to Is playing) then do (Player Group - Remove Player 10 (Light Blue) from Team2) else do (Do nothing)
If ((Player 11 (Dark Green) slot status) Not equal to Is playing) then do (Player Group - Remove Player 11 (Dark Green) from Team2) else do (Do nothing)
If ((Player 12 (Brown) slot status) Not equal to Is playing) then do (Player Group - Remove Player 12 (Brown) from Team2) else do (Do nothing)
Countdown Timer - Start TeamDuel as a One-shot timer that will expire in 290.00 seconds
Countdown Timer - Create a timer window for (Last started timer) with title Next Team Duel
Set TeamDuel = (Last started timer)
Set OneTeam = (All allies of Player 1 (Red))
Set TwoTeam = (All allies of Player 7 (Green))
----------------------------------------------------------------------
Code:
Team Duel Pause
Events
Time - TeamDuel expires
Conditions
Team1Dying Equal to False
Team2Dying Equal to False
Actions
Unit - Pause all units
Unit - Move (Random unit from (Units owned by Player 1 (Red) matching (((Matching unit) is A Hero) Equal to True))) instantly to (Random point in Plyr 1 Team Duel Seat <gen>)
Unit Group - Pick every unit in (Units in Plyr 1 Team Duel Seat <gen>) and do (Actions)
Loop - Actions
Set RedTeamDuelHero = (Picked unit)
Unit - Set life of RedTeamDuelHero to 100.00%
Unit - Set mana of RedTeamDuelHero to 100.00%
Camera - Pan camera as necessary for Player 1 (Red) to (Center of Plyr 1 Team Duel Seat <gen>) over 0.50 seconds
Unit - Move (Random unit from (Units owned by Player 2 (Blue) matching (((Matching unit) is A Hero) Equal to True))) instantly to (Random point in Plyr 2 Team Duel Seat <gen>)
Unit Group - Pick every unit in (Units in Plyr 2 Team Duel Seat <gen>) and do (Actions)
Loop - Actions
Set BlueTeamDuelHero = (Picked unit)
Unit - Set life of BlueTeamDuelHero to 100.00%
Unit - Set mana of BlueTeamDuelHero to 100.00%
Camera - Pan camera as necessary for Player 2 (Blue) to (Center of Plyr 2 Team Duel Seat <gen>) over 0.50 seconds
Unit - Move (Random unit from (Units owned by Player 3 (Teal) matching (((Matching unit) is A Hero) Equal to True))) instantly to (Random point in Plyr 3 Team Duel Seat <gen>)
Unit Group - Pick every unit in (Units in Plyr 3 Team Duel Seat <gen>) and do (Actions)
Loop - Actions
Set TealTeamDuelHero = (Picked unit)
Unit - Set life of TealTeamDuelHero to 100.00%
Unit - Set mana of TealTeamDuelHero to 100.00%
Camera - Pan camera as necessary for Player 3 (Teal) to (Center of Plyr 3 Team Duel Seat <gen>) over 0.50 seconds
Unit - Move (Random unit from (Units owned by Player 4 (Purple) matching (((Matching unit) is A Hero) Equal to True))) instantly to (Random point in Plyr 4 Team Duel Seat <gen>)
Unit Group - Pick every unit in (Units in Plyr 4 Team Duel Seat <gen>) and do (Actions)
Loop - Actions
Set PurpleTeamDuelHero = (Picked unit)
Unit - Set life of PurpleTeamDuelHero to 100.00%
Unit - Set mana of PurpleTeamDuelHero to 100.00%
Camera - Pan camera as necessary for Player 4 (Purple) to (Center of Plyr 4 Team Duel Seat <gen>) over 0.50 seconds
Unit - Move (Random unit from (Units owned by Player 5 (Yellow) matching (((Matching unit) is A Hero) Equal to True))) instantly to (Random point in Plyr 5 Team Duel Seat <gen>)
Unit Group - Pick every unit in (Units in Plyr 5 Team Duel Seat <gen>) and do (Actions)
Loop - Actions
Set YellowTeamDuelHero = (Picked unit)
Unit - Set life of YellowTeamDuelHero to 100.00%
Unit - Set mana of YellowTeamDuelHero to 100.00%
Camera - Pan camera as necessary for Player 5 (Yellow) to (Center of Plyr 5 Team Duel Seat <gen>) over 0.50 seconds
Unit - Move (Random unit from (Units owned by Player 6 (Orange) matching (((Matching unit) is A Hero) Equal to True))) instantly to (Random point in Plyr 6 Team Duel Seat <gen>)
Unit Group - Pick every unit in (Units in Plyr 6 Team Duel Seat <gen>) and do (Actions)
Loop - Actions
Set OrangeTeamDuelHero = (Picked unit)
Unit - Set life of OrangeTeamDuelHero to 100.00%
Unit - Set mana of OrangeTeamDuelHero to 100.00%
Camera - Pan camera as necessary for Player 6 (Orange) to (Center of Plyr 6 Team Duel Seat <gen>) over 0.50 seconds
Unit - Move (Random unit from (Units owned by Player 7 (Green) matching (((Matching unit) is A Hero) Equal to True))) instantly to (Random point in Plyr 7 Team Duel Seat <gen>)
Unit Group - Pick every unit in (Units in Plyr 7 Team Duel Seat <gen>) and do (Actions)
Loop - Actions
Set GreenTeamDuelHero = (Picked unit)
Unit - Set life of GreenTeamDuelHero to 100.00%
Unit - Set mana of GreenTeamDuelHero to 100.00%
Camera - Pan camera as necessary for Player 7 (Green) to (Center of Plyr 7 Team Duel Seat <gen>) over 0.50 seconds
Unit - Move (Random unit from (Units owned by Player 8 (Pink) matching (((Matching unit) is A Hero) Equal to True))) instantly to (Random point in Plyr 8 Team Duel Seat <gen>)
Unit Group - Pick every unit in (Units in Plyr 8 Team Duel Seat <gen>) and do (Actions)
Loop - Actions
Set PinkTeamDuelHero = (Picked unit)
Unit - Set life of PinkTeamDuelHero to 100.00%
Unit - Set mana of PinkTeamDuelHero to 100.00%
Camera - Pan camera as necessary for Player 8 (Pink) to (Center of Plyr 8 Team Duel Seat <gen>) over 0.50 seconds
Unit - Move (Random unit from (Units owned by Player 9 (Gray) matching (((Matching unit) is A Hero) Equal to True))) instantly to (Random point in Plyr 9 Team Duel Seat <gen>)
Unit Group - Pick every unit in (Units in Plyr 9 Team Duel Seat <gen>) and do (Actions)
Loop - Actions
Set GrayTeamDuelHero = (Picked unit)
Unit - Set life of GrayTeamDuelHero to 100.00%
Unit - Set mana of GrayTeamDuelHero to 100.00%
Camera - Pan camera as necessary for Player 9 (Gray) to (Center of Plyr 9 Team Duel Seat <gen>) over 0.50 seconds
Unit - Move (Random unit from (Units owned by Player 10 (Light Blue) matching (((Matching unit) is A Hero) Equal to True))) instantly to (Random point in Plyr 10 Team Duel Seat <gen>)
Unit Group - Pick every unit in (Units in Plyr 10 Team Duel Seat <gen>) and do (Actions)
Loop - Actions
Set LightblueTeamDuelHero = (Picked unit)
Unit - Set life of LightblueTeamDuelHero to 100.00%
Unit - Set mana of LightblueTeamDuelHero to 100.00%
Camera - Pan camera as necessary for Player 10 (Light Blue) to (Center of Plyr 10 Team Duel Seat <gen>) over 0.50 seconds
Unit - Move (Random unit from (Units owned by Player 11 (Dark Green) matching (((Matching unit) is A Hero) Equal to True))) instantly to (Random point in Plyr 11 Team Duel Seat <gen>)
Unit Group - Pick every unit in (Units in Plyr 11 Team Duel Seat <gen>) and do (Actions)
Loop - Actions
Set DarkgreenTeamDuelHero = (Picked unit)
Unit - Set life of DarkgreenTeamDuelHero to 100.00%
Unit - Set mana of DarkgreenTeamDuelHero to 100.00%
Camera - Pan camera as necessary for Player 11 (Dark Green) to (Center of Plyr 11 Team Duel Seat <gen>) over 0.50 seconds
Unit - Move (Random unit from (Units owned by Player 12 (Brown) matching (((Matching unit) is A Hero) Equal to True))) instantly to (Random point in Plyr 12 Team Duel Seat <gen>)
Unit Group - Pick every unit in (Units in Plyr 12 Team Duel Seat <gen>) and do (Actions)
Loop - Actions
Set BrownTeamDuelHero = (Picked unit)
Unit - Set life of BrownTeamDuelHero to 100.00%
Unit - Set mana of BrownTeamDuelHero to 100.00%
Camera - Pan camera as necessary for Player 12 (Brown) to (Center of Plyr 12 Team Duel Seat <gen>) over 0.50 seconds
Sound - Play O05Cenarius27 <gen>
Wait 1.00 seconds
Sound - Play O05Cenarius03 <gen>
Game - Display to (All players) the text: Team One vs. Team T...
Sound - Play BattleNetTick <gen>
Wait 1.00 seconds
Game - Display to (All players) the text: 2!
Sound - Play BattleNetTick <gen>
Wait 1.00 seconds
Game - Display to (All players) the text: 1!
Sound - Play BattleNetTick <gen>
Wait 1.00 seconds
Game - Display to (All players) the text: Let the battle for ...
Unit - Unpause all units
Unit Group - Pick every unit in (Units in (Playable map area)) and do (If (((Owner of (Picked unit)) controller) Equal to Computer) then do (Unit - Order (Picked unit) to Patrol To (Center of Team Duel Area <gen>)) else do (Do nothing))
-------------------------------------------------------------------------
Code:
Recheck Team Duel Team 1
Events
Time - TeamDuel expires
Conditions
Team1Dying Equal to True
Actions
Countdown Timer - Start TeamDuel as a One-shot timer that will expire in 2.50 seconds
------------------------------------------------------------------------
Code:
Recheck Team Duel Team 2
Events
Time - TeamDuel expires
Conditions
Team2Dying Equal to True
Actions
Countdown Timer - Start TeamDuel as a One-shot timer that will expire in 2.50 seconds
-----------------------------------------------------------------------