StarCraft has no random number action. What it has is randomising a switch, which comes out Set or Cleared - zero or one. One binary digit.
So use several digits. Just as the 4 in 1423 means 400, a 1 in the second binary place means 2 and in the third means 4. Three places give you eight outcomes, 0 through 7.
- 1Randomise the switch.
- 2If it is Set, add 1 to a death counter. If Cleared, do nothing.
- 3Randomise again, and add 2 if Set.
- 4Randomise again, and add 4 if Set.
- 5The counter now holds a number from 0 to 7.
You do not need a trigger for the Cleared case: adding nothing is adding zero. And remember to reset the counter to zero before the next draw.
If the number of outcomes is not a power of two it does not divide cleanly. Six outcomes from three digits leaves 6 and 7 over, and folding those onto other results makes those results twice as likely - a bias that appears silently. Re-drawing when you land on a leftover is the honest fix.
