ok first off this is quite simple,
RC is just a integer
CS is a unit type array.
Untitled Trigger 001
Events
Map initialization
Conditions
Actions
Set CS[1] = Peasant
Set CS[2] = Footman
Set CS[3] = Knight
Set CS[4] = Rifleman
Set CS[5] = Mortar Team
Untitled Trigger 002
Events
Time - Every 5.00 seconds of game time
Conditions
Actions
Set RC = (Random integer number between 1 and 5)
For each (Integer A) from 1 to 5, do (If (RC Equal to (Integer A)) then do (Unit - Create 1 CS[(Integer A)] for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees) else do (Do nothing))
ok oviously u wont use the same units and it will be more than 5 u might not spawn them in the center they might not be reds but it gives u a general idea.