Tell me more ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

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.

share|improve this question
6  
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 – JohnoBoy Feb 18 at 9:39
It would also be nice if you could include a picture to make it easier to understand your question/answer. – tombull89 Feb 18 at 10:03
@JohnoBoy - unfortunately editing the question is the "official" advice. See - meta.stackoverflow.com/questions/114314/… – ChrisF Feb 18 at 10:07
@ChrisF I suggest you re-read that post, you've misunderstood it. – Ender Feb 18 at 13:59
1  
@ChrisF I feel you've misunderstood the answers to your question. – Ender Feb 18 at 14:16
show 4 more comments

1 Answer

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.

share|improve this answer
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). – SevenSidedDie Feb 19 at 22:48
1  
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 – Jon Story Feb 20 at 15:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.