Hmm sounds good. I've often thought about random battles myself, and here is the extremely complicated way I've discovered (this is what I'm using to randomly place items/weapons in my upcoming Snipers-like map):
Have 1 computer player (lets use Player 8 as an example) gain 1 mineral for every 5 seconds:
Trigger |
Description: |
Gain Ore |
|
Players: |
¤ Player 8 |
Conditions: |
¤ Always |
Actions: |
¤ Add 1 ore for Player 8.
|
¤ Wait for 1000 miliseconds.
|
¤ Preserve trigger. |
Follow that up with:
Trigger |
Description: |
Reset Ore |
|
Players: |
¤ Player 8 |
Conditions: |
¤ Player 8 accumulates exactly 5 ore. |
Actions: |
¤ Set ore for Player 8 to 0. |
Next do the same for vespene gas except make it give 1 gas per 2 seconds:
Trigger |
Description: |
Gain Gas |
|
Players: |
¤ Player 8 |
Conditions: |
¤ Always |
Actions: |
¤ Add 1 gas for Player 8.
|
¤ Wait for 2000 miliseconds.
|
¤ Preserve trigger. |
Follow that up with:
Trigger |
Description: |
Reset Gas |
|
Players: |
¤ Player 8 |
Conditions: |
¤ Player 8 accumulates exactly 5 gas. |
Actions: |
¤ Set gas for Player 8 to 0. |
Then basically set up each event:
Trigger |
Description: |
Random battle |
|
Players: |
¤ Player 1 |
Conditions: |
¤ Player 8 accumulates exactly 1 ore.
|
¤ Player 8 accumulates exactly 3 gas. |
Actions: |
¤ RANDOM BATTLE |
Doing it this way can randomly choose one of atleast 25 battles to trigger. Raising the maximum ore/gas in theur respective second triggers can create even more variables.
Then you have them either move to a different area to fight or have a unit spawn near them to fight.
As far as spawning near them goes, you could have either burrowed units around the terrain (so whenever a player comes in contact with one the random battle is triggered) or you could tryto figure out some sort of system to trigger the random battles (the above could be used to trigger it somehow perhaps).
I know this is totally confusing, but it may be worth a shot. Its working for me so far

.