- Press a button.
- Activate a Command Block with a testfor command.
- Output a short pulse from the Command Block if testfor is successful.
- Press the button again.
- Have testfor succeed again, tripping the circuit a second time.
And one were to push the button while standing 2 blocks away, and the output activates a Dispenser, it spits out an item. My whole circuit looks like this:
If I press the button a second time, nothing happens because the comparator never turned off. I want it to dispense every time the button is pressed and the testfor command is successful (i.e., I want the comparator to send out a pulse instead of just staying on, because it jams up the circuit). Just curious if that's possible.
The way it's set up, it seems like I would have to step back to 4 blocks away from the Command Block, press the button so the command fails, and then step closer and press the button again. That's really asinine, and could cause a lot of unwanted results in other circuits where running the command a second time would actually do something to effect the world (teleport a player, change a scoreboard score, etc). I realize I could just hook up an AND gate with the button and my comparator as the inputs, but that makes it occupy more space than I'd like it to and doesn't really excuse it for being asinine. Just wanted to know if there's some other way. Maybe Mojang should add a tickbox on the Command Block interface that would let you configure whether the output stayed on or sent a pulse. I would like that.