If you don't mind the process taking longer than 1 game frame, you can do something simple like this:
Collapse Box
Trigger("Player 1", "Player 2", "Player 3", "Player 4", "Player 5", "Player 6"){
Conditions:
Deaths("Current Player", "Terran Marine", At least, 1);
Actions:
Set Switch("Switch1", randomize);
Set Switch("Switch2", randomize);
Preserve Trigger();
}
//-----------------------------------------------------------------//
Trigger("Player 1", "Player 2", "Player 3", "Player 4", "Player 5", "Player 6"){ //Move cursor 3 over.
Conditions:
Deaths("Current Player", "Terran Marine", At least, 1);
Switch("Switch1", Not Set);
Switch("Switch2", Not Set);
Actions:
MemoryAddr(0x0058dc60, Add, 96); //Move Location 1 left edge.
MemoryAddr(0x0058dc68, Add, 96); //Move Location 1 right edge.
Set Switch("Switch1", randomize);
Set Switch("Switch2", randomize);
Preserve Trigger();
}
//-----------------------------------------------------------------//
Trigger("Player 1", "Player 2", "Player 3", "Player 4", "Player 5", "Player 6"){ //Move cursor 1 over.
Conditions:
Deaths("Current Player", "Terran Marine", At least, 1);
Switch("Switch1", Set);
Actions:
MemoryAddr(0x0058dc60, Add, 32);
MemoryAddr(0x0058dc68, Add, 32);
Preserve Trigger();
}
//-----------------------------------------------------------------//
Trigger("Player 1", "Player 2", "Player 3", "Player 4", "Player 5", "Player 6"){ //Move cursor 2 over.
Conditions:
Deaths("Current Player", "Terran Marine", At least, 1);
Switch("Switch2", Set);
Actions:
MemoryAddr(0x0058dc60, Add, 64);
MemoryAddr(0x0058dc68, Add, 64);
Preserve Trigger();
}
//-----------------------------------------------------------------//
Trigger("Player 1", "Player 2", "Player 3", "Player 4", "Player 5", "Player 6"){ //Cursor loop-back.
Conditions:
Deaths("Current Player", "Terran Marine", At least, 1);
MemoryAddr(0x0058dc68, At least, 193);
Actions:
MemoryAddr(0x0058dc60, Set To, 0);
MemoryAddr(0x0058dc68, Set To, 32);
Preserve Trigger();
}
//-----------------------------------------------------------------//
Trigger("Player 1", "Player 2", "Player 3", "Player 4", "Player 5", "Player 6"){ //Create marine if slot is free.
Conditions:
Deaths("Current Player", "Terran Marine", At least, 1);
Bring("Force 1", "Terran Marine", "Location 1", Exactly, 0);
Actions:
Remove Unit("Player 12", "Terran Marine"); //Makes SC update the unit array, so if the next player randomizes into an occupied slot on the same frame, the "Bring" condition will work.
Set Deaths("Current Player", "Terran Marine", Subtract, 1);
Create Unit with Properties("Current Player", "Terran Marine", 1, "Location 1", 1);
MemoryAddr(0x0058dc60, Set To, 0);
MemoryAddr(0x0058dc68, Set To, 32);
Preserve Trigger();
}
//-----------------------------------------------------------------//
Trigger("Player 8"){ //After all players are processed, restart the process on the row below.
Conditions:
Deaths("Player 8", "Terran Marine", At least, 1);
Deaths("Force 1", "Terran Marine", Exactly, 0);
Actions:
Set Deaths("Player 8", "Terran Marine", Subtract, 1);
Set Deaths("Force 1", "Terran Marine", Add, 1);
MemoryAddr(0x0058dc64, Add, 32);
MemoryAddr(0x0058dc6c, Add, 32);
Preserve Trigger();
}
//-----------------------------------------------------------------//
Trigger("Player 8"){ //Initial Setup. P8 marine deaths define how many rows to randomize for (0-based).
Conditions:
Actions:
Set Deaths("Player 8", "Terran Marine", Set To, 2);
Set Deaths("Force 1", "Terran Marine", Set To, 1);
}
//-----------------------------------------------------------------//
Trigger("Player 8"){ //Single-frame Hypers
Conditions:
Actions:
MemoryAddr(0x006509a0, Set To, 0);
Preserve Trigger();
}
You could probably speed it up by doing stuff like using burrowed zerglings on every slot and centering the location on the nearest free spot if randomizing on an occupied one. Or at least do that for the 6th player (which is not necessarily player 6 btw) as that's the most time-expensive one.