How to make multiple switches dependant on each other?

Here’s how I’ve imagined it (through mspaint).

You push number 3 and itself and the one next to it (2) turns on. If you press number 2 itself and both those next to it switches from their current state. So it’ll just be an on/off system.

I was thinking I’d be using a branch system to check if those next to the button is switched on and then make it the opposite.

If you just have this count of buttons, I would use cases for every button with a following branch which is handling the following functions ( switching on/off the buttons). This is much faster to create your own scaleable algorithm. But ony if you dont have to scale up your button table.

Ok seems like I figured it out myself ;D.

Just layed it down with two buttons to start with instead of three.

Used three hours to figure out that I had to set this variable…