QUOTE(Zeratul_101 @ Oct 23 2006, 11:20 PM)
hows that multiplying by powers of 3?
are you sure he didn't mean 1,3,9,27 insteado of 1,2,4,8?
[right][snapback]578158[/snapback][/right]
It is. Maybe it wasn't obvious because I only showed it for 2 switches.
Here's the entire system for 4 switches in base 3 (conditions are on the left of the - and actions are on the right):
Clear hit
Value at least 54 - switch 4 is 2, subtract 54 and set hit
Value at least 27 - switch 4 is 1, subtract 27 and set hit
hit cleared - switch 4 is 0
Clear hit
Value at least 18 - switch 3 is 2, subtract 18 and set hit
Value at least 9 - switch 3 is 1, subtract 9 and set hit
hit cleared - switch 3 is 0
Clear hit
Value at least 6 - switch 2 is 2, subtract 6 and set hit
Value at least 3 - switch 2 is 1, subtract 3 and set hit
hit cleared - switch 2 is 0
Clear hit
Value exactly 2 - switch 1 is 2, subtract 2 and set hit
Value exactly 1 - switch 1 is 1, subtract 1 and set hit
hit cleared - switch 1 is 0
I think it would be accurate to say that you need (base + 1) triggers for each switch embedded in a single death count
just for detection. And since there's not a great way to abstract out
which death count you're using, you'd have to duplicate this logic for each death counter you wanted to turn into a set of switches. Not pretty.