QUOTE(l)ark_13 @ Aug 20 2005, 09:58 PM)
So lets say I need to give half the units in a location to a different player. I would:
First give all the units (12 units in total) in the location to the other player, one at a time, while adding 1 "Dividend". Then, I would start the dividing process. I would make the max 64 (in your case it was 256). <---is that right?
Say the units, Marines, belong to P8 and you want to give half to P1, and you want to round up. Note that this example is slightly different, or more specifically, simpler, compared to the Death counts. This is due to the fact that you can directly Give Units, but you cannot Give Deaths (so to speak).
P: P1
C: P8 commands at least 2 Marine
A: Give 1 Marine from P8 to P9
A: Give 1 Marine from P8 to P1
A: Preserve
P: P1
C: P8 commands exactly 1 Marine
A: Give 1 Marine from P8 to P1
A: Preserve
P: P1
C: P9 commands at least 1 Marine
C: P8 commands exactly 0 Marine
A: Give all Marines from P9 to P8
A: Preserve
QUOTE
How would that actually work? (If I know how the trigger works then I usually understand it a lot better).
[right][snapback]294429[/snapback][/right]
For the death counts: basically, you start with a group of things.
You mark these things off, 2 at a time, to keep track of which things you've checked through. Everytime you mark 2, you add 1 to a new group, the quotient. Obviously this can get slow with big numbers, so that's where binary comes in. Of course, if you're working with very few things, you don't have to use the other powers of 2.
FYI: Dividend / Divisor = Quotient
For the units: basically, it's one of those "1 for you, 1 for me" things that gives the units to a temporary player, and at the end of the transactions gives the units from teh temporary player back to the original player.