1

Need command help!

ConspicuousNinja 11/24/14 11:37 pm
310
11/26/2014 10:58 am
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.
Posted by
ConspicuousNinja
Level 43 : Master Ninja
29

  Have something to say?

JoinSign in

1

Clain Y
11/26/2014 10:58 am
Level 4 : Apprentice Explorer
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.
2

Welcome