i'n my tower diffence you can select random race, but the problem is that i always get the same builder (90% of the cases) when i test my map. This is my trigger:
(I know it leaks)
-
random
-
Events
-
Unit - A unit Finishes training a unit
-
-
Conditions
-
((Trained unit) is A peon-type unit) Equal to True
-
-
Actions
-
Set tempPlayer = (Owner of (Triggering unit))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Trained unit-type) Equal to Random
-
-
Then - Actions
-
Unit - Remove (Trained unit) from the game
-
Set tempInt = (Random integer number between 1 and 80)
-
If (tempInt Less than or equal to 20) then do (Unit - Create 1 Crazy Elf Scientist for tempPlayer at (tempPlayer start location) facing Default building facing degrees) else do (Do nothing)
-
If ((tempInt Less than or equal to 40) and (tempInt Greater than or equal to 21)) then do (Unit - Create 1 Ethereal Builder for tempPlayer at (tempPlayer start location) facing Default building facing degrees) else do (Do nothing)
-
If ((tempInt Greater than or equal to 41) and (tempInt Less than or equal to 60)) then do (Unit - Create 1 Mad Scientist for tempPlayer at (tempPlayer start location) facing Default building facing degrees) else do (Do nothing)
-
If ((tempInt Greater than or equal to 61) and (tempInt Less than or equal to 80)) then do (Unit - Create 1 Physicist for tempPlayer at (tempPlayer start location) facing Default building facing degrees) else do (Do nothing)
-
-
Else - Actions
-
-
-
(I know it leaks)