Armor Stand state clock 1.13+
I have a Scoreboard dummy objective called 'State', and I have an Armor Stand tagged with 'Game'. How do I make a fill clock that runs when that tagged Armor Stand has a state of '0'?
This is my current command:
-- top command block (impulse, needs redstone)
execute as @e[tag=Game, limit=1] if score @s State matches 0 run fill ~ ~-1 ~ ~-20 ~-1 ~ minecraft:redstone_block
-- redstone block in between
-- bottom command block (impulse, needs redstone)
execute as @e[tag=Game, limit=1] if score @s State matches 0 run fill ~ ~-1 ~ ~-20 ~-1 ~ minecraft:stone
There are two things that need to be fixed:
First, change the second command to:
execute as @e[tag=Game, limit=1] if score @s State matches 0 run fill ~ ~1 ~ ~-20 ~1 ~ minecraft:air
The second problem is that your Armor Stand has, by default, no score (no score is different then '0'). To fix this, use:
/scoreboard players set @e[tag=Game] State 0
This should work.