I have 2 kills for items shops set up on my world. Both are set up correctly, one takes 10 kills and gives a diamond sword. The other is supposed to take 5 kills, which it does, and give 4 bookshelves. However, after using the second one once, it no longer works.
Attachments
Comments 6
Working command combo was 'scoreboard players remove @p[score_Kills_min=10,r=3] Kills 10' connected to 'give @p 276'. Non working was 'scoreboard players remove @p[score_Kills_min=5,r=3] Kills 5' connected to 'give @p 47'. I added a picture of my set up
Here's the problem. A comparator will output a signal if the requirements are met and will remain true until you activate it again and you no longer meet the requirements to set it to false. So connecting a comparator to a command block, when you activate it it will do what you want it to do if you meet the requirements and if true it will output a signal, but the thing is it outputs it forever.
So next time even if you press the button, but still meet the requirements it will still do what the first command block says but won't go to the second command, because the signal never turned off. As I understood, they work as intended, not the best way in my opinion. They should turn off after a tick or so if I were to do them.
I suggest making Command B > Rpeapeater > Command block and since you check if the player has enough points it will remove score and give the item as long as you have enough points for the command to give you the item and remove the number of points.
Sounds complicated, but it really isn't 😉
Oh alright, I see what you're saying. I also have another question. If a command block is set up to a clock, activiating and deavtivating it repeatedly causing the signal to pulse coming from the command block, and is connected to a comparator, shouldn't the comparator also pulse when the requirements are met for the command block?
Can you give more details such as, what is your command, how many kills did you have in total, did you use testfor command with a comparator, and so on.