Based on the link you gave, Sir Gordon, I really don't know what kind of variables are those!
Random
Events
Map initialization
Conditions
Actions
Set unitarray[1] = hero1
Set unitarray[2] = hero2
Set unitarray[3] = hero3
Set unitarray[4] = hero4
Random Pick
Events
Player - Player 1 (Red) types a chat message containing -ar as An exact match
Conditions
Actions
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Unit - Create 1 unitarray[(Random integer number between 1 and 4)] for (Picked player) at ((Picked player) start location) facing Default building facing degrees
Game - Display to (All players) the text: (((Name of (Picked player)) + |r has randomed ) + (Name of (Last created unit)))
Selection - Select (Last created unit) for (Picked player)
I've done that trigger for so many times... It works but it ain't random... It is always the same when you restart the game.
File->preferences->test map-> take off "v" from use fixed random seed
and again stop double posting...
Set players = (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing)))
Player Group - Pick every player in [I][B]players[/B][/I] and do (Actions)
Random
Events
Map initialization
Conditions
Actions
Set unitarray[1] = hero1
Set unitarray[2] = hero2
Set unitarray[3] = hero3
Set unitarray[4] = hero4
For each (Integer A) from 1 to 4, do (Actions)
Loop - Actions
Unit Group - Add unitarray[(Integer A)] to herogroup
Random Pick
Events
Player - Player 1 (Red) types a chat message containing -ar as An exact match
Conditions
Actions
Set players = (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing)))
Player Group - Pick every player in players and do (Actions)
Loop - Actions
Unit Group - Pick every unit in (Random 1 units from herogroup) and do (Actions)
Loop - Actions
Unit - Create 1 (Unit-type of (Picked unit)) for (Picked player) at ((Picked player) start location) facing Default building facing degrees
Unit Group - Remove (Picked unit) from herogroup
Game - Display to (All players) the text: (((Name of (Picked player)) + |r has randomed ) + (Name of (Last created unit)))
Selection - Select (Last created unit) for (Picked player)