Question
I am making a map in Minecraft that other people can play. I have a dispenser with an iron, golden and diamond sword in it. I want the player to be able to use this dispenser only once. How would I do this?
Answer
The simplest way to accomplish this is to build an RS-NOR latch, and wire the input and the dispenser to it. When you activate the input, the RS-NOR will flip, causing it to stay on. This means that no matter how many times you press the button, the dispenser will only dispense one time (unless of course you reset the latch).
This is an example of what the contraption may look like from the outside.
The following image is a look at the actual RS-NOR latch within the circuit. This is a vertical RS-NOR latch, because it only takes up one block wide of space (with the exception of the button, which isn't needed). When the button in the first image is pressed, it triggers the bottom redstone torch in this image to turn off, which then makes the wire running on the top of the latch turn off. The redstone torch on the left side of the latch turns on, giving continuous power the latch and not allowing subsequent button presses to do anything. While this is happening, it also powers the wiring extending downwards, which is wired to the dispenser.
The button pictured, however, acts as a reset switch, which is helpful when doing maintenance.
Finally, here is a broader look at the entire circuit.
Check more discussion of this question.
No comments:
Post a Comment