I did all random trigger, this is the setup trigger:
About the vairbels:
And this is the random trigger:
But when i test the game i always get the same hero...
[I did exectly what they said Here.]
Code:
Tavern Initialization
Events
Map initialization
Conditions
Actions
Set TotalHeroes = 11
Set RandomCount = 11
Set Hero_Array[1] = Dark Paladin
Set Hero_Array[2] = Feral Paladin
Set Hero_Array[3] = Fire Paladin
Set Hero_Array[4] = Frost Paladin
Set Hero_Array[5] = Holy Paladin
Set Hero_Array[6] = Light Paladin
Set Hero_Array[7] = Nature Paladin
Set Hero_Array[8] = Thunder Paladin
Set Hero_Array[9] = Voodoo Paladin
Set Hero_Array[10] = Water Paladin
Set Hero_Array[11] = Wind Paladin
For each (Integer A) from 1 to 11, do (Actions)
Loop - Actions
Set RandomData[(Integer A)] = (Integer A)
Code:
TotalHeroes = 11 [B](Integer)[/B]
RandomCount = 11 [B](integer)[/B]
Hero_Array[x] = x [B](Unit-Type Array, Size 11)[/B]
RandomData[x] = x [B](Integer Array, Size 11)[/B]
And this is the random trigger:
Code:
Run All Random
Events
Conditions
Actions
For each (Integer A) from 1 to 8, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Player((Integer A))) slot status) Equal to Is playing
Then - Actions
Set RandomHero = (Random integer number between 1 and RandomCount)
Unit - Create 1 Hero_Array[RandomData[RandomHero]] for (Player((Integer A))) at ((Player((Integer A))) start location) facing Default building facing degrees
Camera - Pan camera for (Owner of (Last created unit)) to ((Owner of (Last created unit)) start location) over 0.00 seconds
Selection - Select (Last created unit) for (Owner of (Last created unit))
Game - Display to (All players) the text: ((Name of (Owner of (Last created unit))) + ( has randomed + (Name of (Last created unit))))
Player - Set name of (Owner of (Last created unit)) to ((Name of (Owner of (Last created unit))) + ( + (( + ((Name of (Last created unit)) + )))))
Set RandomData[RandomHero] = RandomCount
Set RandomCount = (RandomCount - 1)
Else - Actions
Do nothing
But when i test the game i always get the same hero...
[I did exectly what they said Here.]