Trigger must be in order.Trigger |
Conditions: |
¤ Player commands at least 1 "I MAKE LARVA EXPLODE" |
Actions: |
¤ Random all involved switches.
|
¤ Preserve Trigger |
I'm assuming you won't be using a "I MAKE LARVA EXPLODE" unit, but just change the trigger to suit whatever's making it explode.
You need to make the judgement call on how many switches you need. Each one will represent a power of 2 later on.
Trigger |
Conditions: |
¤ Player commands at least 2^x larva
|
¤ Switch X is set |
Actions: |
¤ Clear Switch X
|
¤ Give 2^x larva at "Anywhere" from Player to Unrelated Player
|
¤ Preserve Trigger |
You need to make these triggers substituting for x starting at 1. Start wherever the trigger does not excded the numebr of larva... let's use 50 larva for an example. We want the closest number 2^x < 50. Thus we would start at 32.
THESE TRIGGERS MUST RUN FROM GREATEST TO LEAST, so our example would have triggers for 32, 16, 8, 4, 2, and 1.
Trigger |
Conditions: |
¤ Player commands at least 1 "I MAKE LARVA EXPLODE" |
Actions: |
¤ Center location "this larva explodes" on Larva owned by Player
|
¤ Larva explosion triggers
|
¤ Give ALL larva at "Anywhere" from Unrelated Player to Player
|
¤ Kill all "I MAKE LARVA EXPLODE"
|
¤ Preserve Trigger |