Trying to turn that into a circuit doesn’t work because I have no idea how to make an else if using gates.
The circuit needs to stop checking as soon as one of the conditions is true, but also be able to check everything again after the button is pressed again.
If you use regular ifs instead, it just goes through all of them instantly and doesn’t actually count.
I could probably make the circuit stop, but that would only work once, meaning if the button is pressed again, the circuit won’t continue counting.
This seems very close to a “Swap Switch” Ondrashek asked for here.
Only difference being is, that I use a lever there to allow faster changes in input. Of course, if you still want to use a button, just use a button and a toggle gate to substitute for the lever.
Since Ondrashek didn’t even have the decency to reply to that, I hope at least you can make use of it.
What I was thinking of, looks more like a “switch counter” (you can look it up on google).
But I don’t understand how a switch counter works.
I mean, I understand the scheme, but I think it would just turn every toggle on from the start, so it doesn’t make sense to me.
The solution I have right now, is basically having 2 toggles for each toggle that I want to use for counting.
The first toggle activates when the button is on, the second activates when the button is off, and if the button is on again, and all the toggles are on, the next pair of toggles activates.
If you meant it like the one on the right side, yes, it would all turn on from the start. The right one basically counts “backwards” or down in binary.
To make it count up, simply add NOT Gates like I did on the left.
I suggest you stick with binary and don’t bother with the hell that (imo) is converting that to decimal with a contraption.
Turns out there are different types of flip-flops (that’s what they call toggles in computer science).
I’m checking the switch counter scheme on another software, not pixel worlds, to have acces to these flip-flops. I might be onto something.
I needed the counter because of a bit (no pun intended) different reason.
Edit: I got it. Flip-flops are different from toggles in a way that most flip-flops only switch to on if there are 2 signals that came at the same time.