Trigger Unit steps on CircleOfPower that chooses a random hero
Events
Unit - A unit comes within 256.00 of "CircleRandom"
Conditions
Actions
[COLOR="Blue"] ---- setting the integer variable to [B]math - random number[/B] ----[/COLOR]
Set MyIntegerVariable = (Random integer number between 1 and 4)
[COLOR="Blue"] ---- the first if-then-else is running when the random number was 1 ----[/COLOR]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
[COLOR="Blue"]---- this is an integer comparison ----[/COLOR]
MyIntegerVariable Equal to 1
Then - Actions
Unit - Create 1 "MyFirstHero" for (Owner of (Triggering unit)) at (Region) facing Default building facing (270.0) degrees
Else - Actions
[COLOR="Blue"] ---- the second if-then-else is running when the random number was 2 ----[/COLOR]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
MyIntegerVariable Equal to 1
Then - Actions
Unit - Create 1 "MySecondHero" for (Owner of (Triggering unit)) at (Region) facing Default building facing (270.0) degrees
Else - Actions
[COLOR="Blue"] ---- etc ... one for each random hero with the corresponding integer value ----[/COLOR]
Actions
Set uid[1] = Paladin
Set uid[2] = Archmage
Set uid[3] = Mountain King
Set uid[4] = Blood Mage
Unit - Create 1 uid[(Random integer number between 1 and 4)] for *Some Player at *Somewhere* facing *Something* degrees