How about not making it for each player?
First, set the initial location random at the start of the game:
| Trigger |
| Players: |
| ¤ All players |
| Conditions: |
| ¤ Always |
| Actions: |
¤ Randomize Switch RandLoc1
|
¤ Randomize Switch RandLoc2
|
¤ Randomize Switch RandLoc3
|
| ¤ Randomize Switch RandLoc4 |
Second, if it points to a location that's been taken, have it randomly set again for each location:
| Trigger |
| Players: |
| ¤ All players |
| Conditions: |
¤ Current player brings at least 1 men to Location1
|
¤ Switch RandLoc1 is cleared
|
¤ Switch RandLoc2 is cleared
|
¤ Switch RandLoc3 is cleared
|
| ¤ Switch RandLoc4 is cleared |
| Actions: |
¤ Randomize Switch RandLoc1
|
¤ Randomize Switch RandLoc2
|
¤ Randomize Switch RandLoc3
|
¤ Randomize Switch RandLoc4
|
| ¤ Preserve Trigger |
| Trigger |
| Players: |
| ¤ All players |
| Conditions: |
¤ Current player brings at least 1 men to Location2
|
¤ Switch RandLoc1 is set
|
¤ Switch RandLoc2 is cleared
|
¤ Switch RandLoc3 is cleared
|
| ¤ Switch RandLoc4 is cleared |
| Actions: |
¤ Randomize Switch RandLoc1
|
¤ Randomize Switch RandLoc2
|
¤ Randomize Switch RandLoc3
|
¤ Randomize Switch RandLoc4
|
| ¤ Preserve Trigger |
And so forth for the other locations, using a different combination of switches for each location.
Finally, have a trigger to create the actual unit:
| Trigger |
| Players: |
| ¤ All players |
| Conditions: |
¤ All Players brings at most 0 men to Location1
|
¤ Switch RandLoc1 is cleared
|
¤ Switch RandLoc2 is cleared
|
¤ Switch RandLoc3 is cleared
|
¤ Switch RandLoc4 is cleared
|
¤ Elapsed Time is at least 2 seconds
|
| ¤ All conditions for spawning a new unit |
| Actions: |
¤ Create 1 unit for Current Player at Location1
|
| ¤ Preserve Trigger |
| Trigger |
| Players: |
| ¤ All players |
| Conditions: |
¤ All Players brings at most 0 men to Location2
|
¤ Switch RandLoc1 is set
|
¤ Switch RandLoc2 is cleared
|
¤ Switch RandLoc3 is cleared
|
¤ Switch RandLoc4 is cleared
|
¤ Elapsed Time is at least 2 seconds
|
| ¤ All conditions for spawning a new unit |
| Actions: |
¤ Create 1 unit for Current Player at Location2
|
| ¤ Preserve Trigger |
and again for all possible combinations. As soon as a unit is created, there will be a unit at the location, so the next location will be random again.
Now there's a change you're not using exactly 2^n locations. If that is the case, just pick a new combination whenever a certain combination of switched ends up that's not attached to a location:
| Trigger |
| Players: |
| ¤ All players |
| Conditions: |
¤ Switch RandLoc1 is set
|
¤ Switch RandLoc2 is set
|
¤ Switch RandLoc3 is set
|
| ¤ Switch RandLoc4 is cleared |
| Actions: |
¤ Randomize Switch RandLoc1
|
¤ Randomize Switch RandLoc2
|
¤ Randomize Switch RandLoc3
|
¤ Randomize Switch RandLoc4
|
| ¤ Preserve Trigger |