this is what I have found through searching, and what I have been using, but it does not seem to work all that good, is this the best way to do random hero or is there any better?
and also for some reason it is not panning the camera at the end there
ty 4 help
Code:
Random
Events
Player - Player 1 (Red) types a chat message containing -random as An exact match
Player - Player 2 (Blue) types a chat message containing -random as An exact match
Player - Player 3 (Teal) types a chat message containing -random as An exact match
Player - Player 4 (Purple) types a chat message containing -random as An exact match
Player - Player 5 (Yellow) types a chat message containing -random as An exact match
Player - Player 6 (Orange) types a chat message containing -random as An exact match
Player - Player 7 (Green) types a chat message containing -random as An exact match
Player - Player 8 (Pink) types a chat message containing -random as An exact match
Player - Player 9 (Gray) types a chat message containing -random as An exact match
Player - Player 10 (Light Blue) types a chat message containing -random as An exact match
Conditions
NHero[(Player number of (Triggering player))] Equal to 0
Actions
Set RandomHero[0] = King Under The Mountain
Set RandomHero[1] = Maya Icestar
Set RandomHero[2] = Cyrox Galadiator
Set RandomHero[3] = Fire Angel
Set RandomHero[4] = Sage Truthbearer
Set RandomHero[5] = Salman Sulaiman (Lich)
Set RandomHero[6] = King of the Forest
Set RandomHero[7] = Chaos Knight
Set RandomHero[8] = Sandman
Set RandomHero[9] = Sea God
Set RandomHero[10] = Silent Assasin
Set RandomHero[11] = Wind Lord
If ((Triggering player) Equal to Player 1 (Red)) then do (Unit - Create 1 RandomHero[(Random integer number between 0 and 11)] for (Triggering player) at (Random point in Region 001 <gen>) facing Default building facing degrees) else do (Do nothing)
If ((Triggering player) Equal to Player 2 (Blue)) then do (Unit - Create 1 RandomHero[(Random integer number between 0 and 11)] for (Triggering player) at (Random point in Region 001 <gen>) facing Default building facing degrees) else do (Do nothing)
If ((Triggering player) Equal to Player 3 (Teal)) then do (Unit - Create 1 RandomHero[(Random integer number between 0 and 11)] for (Triggering player) at (Random point in Region 001 <gen>) facing Default building facing degrees) else do (Do nothing)
If ((Triggering player) Equal to Player 4 (Purple)) then do (Unit - Create 1 RandomHero[(Random integer number between 0 and 11)] for (Triggering player) at (Random point in Region 001 <gen>) facing Default building facing degrees) else do (Do nothing)
If ((Triggering player) Equal to Player 5 (Yellow)) then do (Unit - Create 1 RandomHero[(Random integer number between 0 and 11)] for (Triggering player) at (Random point in Region 001 <gen>) facing Default building facing degrees) else do (Do nothing)
If ((Triggering player) Equal to Player 6 (Orange)) then do (Unit - Create 1 RandomHero[(Random integer number between 0 and 11)] for (Triggering player) at (Random point in Region 023 <gen>) facing Default building facing degrees) else do (Do nothing)
If ((Triggering player) Equal to Player 7 (Green)) then do (Unit - Create 1 RandomHero[(Random integer number between 0 and 11)] for (Triggering player) at (Random point in Region 023 <gen>) facing Default building facing degrees) else do (Do nothing)
If ((Triggering player) Equal to Player 8 (Pink)) then do (Unit - Create 1 RandomHero[(Random integer number between 0 and 11)] for (Triggering player) at (Random point in Region 023 <gen>) facing Default building facing degrees) else do (Do nothing)
If ((Triggering player) Equal to Player 9 (Gray)) then do (Unit - Create 1 RandomHero[(Random integer number between 0 and 11)] for (Triggering player) at (Random point in Region 023 <gen>) facing Default building facing degrees) else do (Do nothing)
If ((Triggering player) Equal to Player 10 (Light Blue)) then do (Unit - Create 1 RandomHero[(Random integer number between 0 and 11)] for (Triggering player) at (Random point in Region 023 <gen>) facing Default building facing degrees) else do (Do nothing)
Camera - Pan camera for (Owner of (Triggering unit)) to (Position of (Last created unit)) over 0.25 seconds
Wait 45.00 seconds
Trigger - Turn off (This trigger)
ty 4 help


