You will need one additional math_counter, four logic_branch, and three logic_case.
logic_case
names: case_one & case_two
case04: 4
case05: 5
logic_branch
names:
• branch_one_uptofive
• branch_one_downtofour
• branch_two_uptofive
• branch_two_downtofour
intitial value: 0, assuming your two counters start at 0. If not, and you aren't sure how to set them, let me know.
math_counter
name: counter_total
logic_case
name: case_counterstate
case01: 1
case02: 2
case03: 3
case04: 0
(when dealing with numbers like this, I prefer to put zero at the end so the rest match up to the key and output)
Set up the following outputs:
| Source Entity | Output | Target Entity | Input | Parameter |
| counter_one | OutValue | case_one | InValue | |
| | | | | |
| counter_two | OutValue | case_two | InValue | |
| | | | | |
| case_one | OnCase04 | branch_one_uptofive | SetValue | 1 |
| case_one | OnCase04 | branch_one_downtofour | Test | |
| case_one | OnCase05 | branch_one_uptofive | Test | |
| case_one | OnCase05 | branch_one_downtofour | SetValue | 1 |
| | | | | |
| case_two | OnCase04 | branch_two_uptofive | SetValue | 1 |
| case_two | OnCase04 | branch_two_downtofour | Test | |
| case_two | OnCase05 | branch_two_uptofive | Test | |
| case_two | OnCase05 | branch_two_downtofour | SetValue | 1 |
| | | | | |
| branch_one_uptofive | OnTrue | !self | SetValue | 0 |
| branch_one_uptofive | OnTrue | counter_total | Add | 1 |
| | | | | |
| branch_one_downtofour | OnTrue | !self | SetValue | 0 |
| branch_one_downtofour | OnTrue | counter_total | Subtract | 1 |
| | | | | |
| branch_two_uptofive | OnTrue | !self | SetValue | 0 |
| branch_two_uptofive | OnTrue | counter_total | Add | 2 |
| | | | | |
| branch_two_downtofour | OnTrue | !self | SetValue | 0 |
| branch_two_downtofour | OnTrue | counter_total | Subtract | 2 |
| | | | | |
| counter_total | OutValue | case_counterstate | InValue | |
Keeping track of four states (two things with "on/off") is easy enough, but this got more complicated because your on and off is actually 7 different states. When counter one is "on" (5 or more) it counts as a value of 1 in counter_total. When counter two is on, it counts as 2. This provides us with four unique values for the four states you want to use.
The mess of logic_branch stuff was required to ensure the total count only changes when going in the right direction. We want to add when going from 4 to 5, but not when going from 6 to 5. Likewise when going to 4.
Finally, the outputs for case_counterstate:
OnCase01: value of 1, (1+0) counter_one is above four. Use this for A red, B blu.
OnCase02: value of 2, (0+2) counter_two is above four. Use this for A blu, B red.
OnCase03: value of 3, (1+2) both are above four. Use this for B active.
OnCase04: value of 0, (0+0) both are below five. Use this for A active.
__________________
(>^_^)>---[] [B]Mapper Kirby says you must get:
Ultimate Mapping Resource Pack!