# How can I control a sequence of outputs via a single input?

Ok, so I'm making a map which needs a level system. By level system I mean:

• Push the button first time,output A lights up.
• Push the button second time,output B lights up.
• Push the button third time,output C lights up.
• And so on.

Essentially, each button press makes the next output in the sequence activate.

• Hi and welcome to Arqade. If you solved your own question, the proper method would be to post the solution as an answer to your question and not edit the question to include the solution Feb 18, 2013 at 9:39
• It would also be nice if you could include a picture to make it easier to understand your question/answer. Feb 18, 2013 at 10:03
• @JohnoBoy - unfortunately editing the question is the "official" advice. See - meta.stackexchange.com/questions/114314/… Feb 18, 2013 at 10:07
• @ChrisF I suggest you re-read that post, you've misunderstood it. Feb 18, 2013 at 13:59
• @ChrisF I feel you've misunderstood the answers to your question. Feb 18, 2013 at 14:16

As far as I understand your question, you want the first button to light A up, the second to light B up but only if A is on, and the third to light C up but only if B is on.

Basically you need to make three T-flip flops. A flip-flop is basically a single on/off memory which is swapped every time you power the input.

ie if it's on and you power it, it goes off. If it's off and you power it, it goes on.

For the first output, A, you only need to use the button to power the flip flop and A will change.

For the second output, B, you need to build an AND gate (you can find various tutorials on this) which has two inputs. The first comes from the output from A, the second from the button, and the output goes to the flip flop which changes the state of B.

The third output, C, is the same as B but uses the third button and B's output instead of A's output.

This will allow you to light the outputs up in the order A->B->C, but will mean you need to turn the outputs off again using C->B->A. You could reverse this, but I won't over-complicate this answer with the method for that. You could, however, simply turn all 3 back off again by powering all three flip flops again manually with a 4th button.

• This is a good and correct answer (+1!), but would be even better with a picture of a working implementation (and more likely to attract more votes). Feb 19, 2013 at 22:48
• Good point, I'll try to make one up later - I replied from work, where my boss would probably object if I fired up Minecraft :p Feb 20, 2013 at 15:01

You have three basic options as shown below:

First you have a hopper/dropper chain, next a piston and block ribbon, and finally, a T flip-flop counter and binary decoder. There are other options, but these are the most straight forward and stick to generic principles that allow for easy expansion and, except for the counter, incredible flexibility.