comparator problems [duplicate]
![comparator problems [duplicate] - Man in Black and White Plaid Dress Shirt Holding Black Smartphone comparator problems [duplicate] - Man in Black and White Plaid Dress Shirt Holding Black Smartphone](/assets/images/comparator_problems_duplicate_0.jpeg)
While I was playing with some redstone tried to make a money system to sell iron. However when I power the command block with a button, the comparator after it stays on.
the command being run is:
/clear @p minecraft:iron_ingot 0 5
and then a comparator leads to:
/scoreboard players add @p Dollars 10
So how do I turn off the comparator?
Best Answer
If the command returns successful, a blockdata value called SucessCount
is true, and until the command returns false, it will remain true. So along with the /scoreboard
command, run /blockdata [Command block X Y Z] {SucessCount:0}
and /setblock [Comparator X Y Z] unpowered_comparator
Pictures about "comparator problems [duplicate]"
![comparator problems [duplicate] - Man in Black and White Plaid Dress Shirt Holding Black Smartphone comparator problems [duplicate] - Man in Black and White Plaid Dress Shirt Holding Black Smartphone](/assets/images/comparator_problems_duplicate_1.jpeg)
![comparator problems [duplicate] - Woman in Blue Shirt Talking to a Young Man in White Shirt comparator problems [duplicate] - Woman in Blue Shirt Talking to a Young Man in White Shirt](/assets/images/comparator_problems_duplicate_2.jpeg)
![comparator problems [duplicate] - Woman in Blue and White Crew Neck Shirt comparator problems [duplicate] - Woman in Blue and White Crew Neck Shirt](/assets/images/comparator_problems_duplicate_3.jpeg)
Comparator Explained (Inverting Comparator, Non-Inverting Comparator and Window Comparator)
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Mikhail Nilov, Mikhail Nilov, Kindel Media, Kindel Media