- Joined
- Oct 17, 2012
- Messages
- 856
The problem is that when I restart this trigger to give each player a new hero, some players may not get a hero.
-
Random Hero
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
Set RH_PlayerChooser[1] = Player 1 (Red)
-
Set RH_PlayerChooser[2] = Player 2 (Blue)
-
Set RH_PlayerChooser[3] = Player 3 (Teal)
-
Set RH_PlayerChooser[4] = Player 4 (Purple)
-
Set RH_PlayerChooser[5] = Player 5 (Yellow)
-
Set RH_PlayerChooser[6] = Player 6 (Orange)
-
Set RH_PlayerChooser[7] = Player 7 (Green)
-
Set RH_PlayerChooser[8] = Player 8 (Pink)
-
Set RH_PlayerChooser[9] = Player 9 (Gray)
-
Set RH_PlayerChooser[10] = Player 10 (Light Blue)
-
Set RH_PlayerChooser[11] = Player 11 (Dark Green)
-
Set RH_PlayerChooser[12] = Player 12 (Brown)
-
Do Multiple ActionsFor each (Integer RH_PlayerNumber) from 1 to 6, do (Actions)
-
Loop - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(RH_PlayerChooser[RH_PlayerNumber] slot status) Equal to (==) Is playing
-
-
Then - Actions
-
Player Group - Add RH_PlayerChooser[RH_PlayerNumber] to DS_Team
-
-
Else - Actions
-
-
-
-
Do Multiple ActionsFor each (Integer RH_PlayerNumber) from 7 to 12, do (Actions)
-
Loop - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(RH_PlayerChooser[RH_PlayerNumber] slot status) Equal to (==) Is playing
-
-
Then - Actions
-
Player Group - Add RH_PlayerChooser[RH_PlayerNumber] to DS_Team2
-
-
Else - Actions
-
-
-
-
-
Player Group - Make DS_Team treat DS_Team as an Ally with shared vision
-
Player Group - Make DS_Team2 treat DS_Team2 as an Ally with shared vision
-
-------- Heroes --------
-
Set RH_Hero[1] = Warden 0005 <gen>
-
Set RH_Hero[2] = Blood Mage 0012 <gen>
-
Set RH_Hero[3] = Demon Hunter 0002 <gen>
-
Set RH_Hero[4] = Sylvanas Windrunner 0001 <gen>
-
Set RH_Hero[5] = Archmage 0004 <gen>
-
Set RH_Hero[6] = Keeper of the Grove 0003 <gen>
-
Set RH_Hero[7] = Mountain King 0013 <gen>
-
Set RH_Hero[8] = Paladin 0006 <gen>
-
Set RH_Hero[9] = Blademaster 0014 <gen>
-
Set RH_Hero[10] = Shadow Hunter 0015 <gen>
-
Set RH_Hero[11] = Lich 0016 <gen>
-
Set RH_Hero[12] = Crypt Lord 0017 <gen>
-
Set RH_Hero[13] = Dreadlord 0024 <gen>
-
Set RH_Hero[14] = Chen Stormstout 0025 <gen>
-
Set RH_Hero[15] = Rexxar 0026 <gen>
-
Set RH_Int = 15
-
Do Multiple ActionsFor each (Integer RH_PlayerNumber) from 1 to 12, do (Actions)
-
Loop - Actions
-
Set RH_RandomInt = (Random integer number between 1 and RH_Int)
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
DS_Hero[RH_PlayerNumber] Not equal to (!=) No unit
-
-
Then - Actions
-
Unit - Change ownership of DS_Hero[RH_PlayerNumber] to Neutral Passive and Change color
-
Set DS_Hero[RH_PlayerNumber] = No unit
-
-
Else - Actions
-
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(RH_PlayerChooser[RH_PlayerNumber] slot status) Equal to (==) Is playing
-
-
Then - Actions
-
Set DS_Hero[RH_PlayerNumber] = RH_Hero[RH_RandomInt]
-
Unit - Change ownership of DS_Hero[RH_PlayerNumber] to RH_PlayerChooser[RH_PlayerNumber] and Change color
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(RH_PlayerChooser[RH_PlayerNumber] is in DS_Team) Equal to (==) True
-
-
Then - Actions
-
Set RH_StartingLocation = (Random point in StartingArea <gen>)
-
Unit - Move DS_Hero[RH_PlayerNumber] instantly to RH_StartingLocation
-
Camera - Pan camera for Player 1 (Red) to RH_StartingLocation over 0.00 seconds
-
Custom script: call RemoveLocation(udg_RH_StartingLocation)
-
-
Else - Actions
-
Set RH_StartingLocation2 = (Random point in StartingArea Copy <gen>)
-
Unit - Move DS_Hero[RH_PlayerNumber] instantly to RH_StartingLocation2
-
Camera - Pan camera for Player 1 (Red) to RH_StartingLocation2 over 0.00 seconds
-
Custom script: call RemoveLocation(udg_RH_StartingLocation2)
-
-
-
-
-
Else - Actions
-
-
-
Set RH_Hero[RH_RandomInt] = RH_Hero[RH_Int]
-
Set RH_Int = (RH_Int - 1)
-
-
-
-
-