- Joined
- Jan 31, 2010
- Messages
- 3,551
I have encountered some annoying issues recently.
Whenever I set my mode to normal or All pick, and players get the heroes they want, if I try to get random hero, it succeeds. However, occasionally, after I -random my hero, I can end up getting a hero that is already in game, selected by other player.
How to make heroes that are already selected not available for -random command?
Thanks in forward.
Whenever I set my mode to normal or All pick, and players get the heroes they want, if I try to get random hero, it succeeds. However, occasionally, after I -random my hero, I can end up getting a hero that is already in game, selected by other player.
How to make heroes that are already selected not available for -random command?
-
Random All Heroes
-
Events
- 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 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
-
Conditions
- GameMode Equal to MODE_AllRandom_AllPick
- Player_Already_Picked[(Player number of (Triggering player))] Equal to 0
-
Actions
- Set Random_Hero = (Random integer number between 1 and RandomTotal_All)
- Unit - Create 1 Heroes_All[RandomData_All[Random_Hero]] for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees
- Set Player_Already_Picked[(Player number of (Triggering player))] = (Player_Already_Picked[(Player number of (Triggering player))] + 1)
-
Player Group - Pick every player in Players and do (Actions)
-
Loop - Actions
- Player - Make (Unit-type of (Last created unit)) Unavailable for training/construction by (Picked player)
-
Loop - Actions
- Set RandomData_All[Random_Hero] = RandomData_All[RandomTotal_All]
- Set RandomTotal_All = (RandomTotal_All - 1)
- Player - Limit training of Heroes to 0 for (Triggering player)
- Quest - Display to (All players matching (((Matching player) is an enemy of (Owner of (Last created unit))) Equal to True)) the Hint message: ((PlayerColors[(Player number of (Owner of (Entering unit)))] + ((Name of (Owner of (Entering unit))) + |r)) + ( has randomed + (Name of (Entering unit))))
-
Events
-
Move Heroes
-
Events
- Unit - A unit enters Taverns <gen>
-
Conditions
- ((Entering unit) is A Hero) Equal to True
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Entering unit) belongs to an ally of Player 1 (Red)) Equal to True
- (Owner of (Entering unit)) Not equal to Neutral Passive
-
Then - Actions
- Unit - Move (Entering unit) instantly to (Center of NE Base <gen>)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Entering unit) belongs to an ally of Player 5 (Yellow)) Equal to True
- (Owner of (Entering unit)) Not equal to Neutral Passive
-
Then - Actions
- Unit - Move (Entering unit) instantly to (Center of NA Base <gen>)
- Else - Actions
-
If - Conditions
- Camera - Pan camera for (Owner of (Entering unit)) to (Position of (Entering unit)) over 0.00 seconds
- Selection - Select (Entering unit) for (Owner of (Entering unit))
- Player - Limit training of Heroes to 0 for (Owner of (Entering unit))
- Quest - Display to (All players matching (((Matching player) is an enemy of (Owner of (Last created unit))) Equal to True)) the Hint message: ((PlayerColors[(Player number of (Owner of (Entering unit)))] + ((Name of (Owner of (Entering unit))) + |r)) + ( has selected + (Name of (Entering unit))))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events