Take the 2-minute tour ×
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 '13 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 '13 at 10:03
    
@JohnoBoy - unfortunately editing the question is the "official" advice. See - meta.stackexchange.com/questions/114314/… –  ChrisF Feb 18 '13 at 10:07
    
@ChrisF I suggest you re-read that post, you've misunderstood it. –  Ender Feb 18 '13 at 13:59
1  
@ChrisF I feel you've misunderstood the answers to your question. –  Ender Feb 18 '13 at 14:16

2 Answers 2

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
1  
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 '13 at 22:48
2  
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 '13 at 15:01

You have three basic options as shown below: Three single selector options

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.

Let's start with the hopper/dropper chain.

Hopper/dropper chain

With a hopper/dropper chain, each hopper faces a dropper, and each dropper faces a hopper to form, well, a single continuous chain. A single item is placed in one of the hoppers in the chain, and a comparator is used to determine if a hopper has the item, which forms the output. Everything is powered from below with redstone torches, keeping the item in one of the hoppers, but when those torches are deactivated, the item flows to the next dropper. When the power is restored, all of the droppers activate, pushing the item along to the next hopper. Longer chains and single sided output can be achieved by filling a pair of hoppers opposite each other with a single item each.

Piston and block ribbon

The piston and block ribbon uses four pistons to push a set of blocks, called the ribbon, containing two blocks of redstone. There's an alternative version that uses glass and a non-transparent block, and there are trade-offs between the two, but we'll stick with this version. This selector is effectively limited to 15 outputs, which is the smallest of the three, but is also the easiest to implement as an unbroken line of redstone lamps, and may very well be the cheapest. In this configuration, the horizontal (sticky) pistons push the two rows in opposing directions, followed by the vertical (sticky) pistons to fill the gap left by the previous operation.

T flip-flop counter and binary decoder

Lastly, we have the T flip-flop with a binary decoder. Knowing how to build one of these is important because it's the basis for all decoders and encoders, and you can build cool things like 7-segment displays with them. However; for this application it doesn't really make sense for a few reasons. First, it's the slowest of the bunch, having significant input lag, especially when needing more options. Second, it's the largest of the bunch in terms of area or volume. Third, it's the hardest to get right. Forth, and probably most importantly, without some complex wiring, it only works with n=2m outputs, whereas the other designs work with an arbitrary number of outputs.

share|improve this answer

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.