1
Need command help!
So, I'm building a Capture the Flag minigame, and I need help with the commands to test for if a person has the flag in their inventory, and when they die, replace the flag on the pedestal and clear it from the players inventory.
So far I'm working on clearing the flag (which is wool) from the players inventory.
So I've got a redstone pulse, going to a command block with the command /testfor @p {Inventory:[{"minecraft:wool"}]}, and then a comparator output going to the command block with the command I'm having trouble with. I tried doing /testfor @p[score_deaths_min=1] {Inventory:[{"minecraft:wool"}]}, and I think it works, but I'm not 100% sure.
But also, if the player has the wool in their inventory, the comparator output is always on, not allowing any pulsing to testfor the deaths.
So far I'm working on clearing the flag (which is wool) from the players inventory.
So I've got a redstone pulse, going to a command block with the command /testfor @p {Inventory:[{"minecraft:wool"}]}, and then a comparator output going to the command block with the command I'm having trouble with. I tried doing /testfor @p[score_deaths_min=1] {Inventory:[{"minecraft:wool"}]}, and I think it works, but I'm not 100% sure.
But also, if the player has the wool in their inventory, the comparator output is always on, not allowing any pulsing to testfor the deaths.
Create an account or sign in to comment.
1
2
Dear Conspicuous Ninja,
I would recommend connecting a command block clock to the second command block. That way they will both be constantly updating. You could also get rid of the first command block and just test for the block of wool in a certain location (probably using the setblock command). I hope this helps.
Sincerely,
Clain Y.
I would recommend connecting a command block clock to the second command block. That way they will both be constantly updating. You could also get rid of the first command block and just test for the block of wool in a certain location (probably using the setblock command). I hope this helps.
Sincerely,
Clain Y.