exge
New Member
- Reaction score
- 15
for some reason this trigger doesnt give me uinque random heroes...
Code:
hero arr
Events
Map initialization
Conditions
Actions
Set hero[1] = Shaman
Set hero[2] = Lich
Set hero[3] = Shadow Priest
Set hero[4] = Teeveseth
Set hero[5] = Hydromancer
Set hero[6] = Fire Revenant
Set hero[7] = Night Assasin
Set random_count = 7
For each (Integer A) from 1 to 7, do (Actions)
Loop - Actions
Set random_data[(Integer A)] = (Integer A)
Code:
random
Events
Player - Player 2 (Blue) types a chat message containing -random as An exact match
Conditions
Actions
Set random_data[random_hero] = random_count
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
random_count Greater than or equal to 1
Then - Actions
Set random_hero = (Random integer number between 1 and random_count)
Unit - Create 1 hero[random_data[random_hero]] for (Triggering player) at ((Triggering player) start location) facing Default building facing (270.0) degrees
Game - Display to (All enemies of (Triggering player)) the text: (playername[(Player number of (Triggering player))] + ( has randomed + (Proper name of (Last created unit))))
Set random_count = (random_count - 1)
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Player - Make (Unit-type of (Last created unit)) Unavailable for training/construction by (Picked player)
Else - Actions