0

I have a squid with a custom name of "Create_Pig_Alter", and whenever it is "standing" on stone, I want to set a scoreboard objective for the squid. I've tried the following command, but it isn't working:

/execute @e[name=Create_Pig_Alter] ~ ~ ~ detect ~ ~-1 ~ stone /scoreboard players set @e PigAlterProgress 1

What am I doing wrong?

1
  • Is that command running on a clock? Jul 6, 2015 at 12:12

2 Answers 2

1

"detect" syntax for /execute:

/execute <target> X Y Z detect X Y Z <block> <Damage> <command>

You are missing the Damage value of the block. You can set the value to -1 to signify any value. Fixed command using a value of 0 for regular smooth stone:

/execute @e[name=Create_Pig_Alter] ~ ~ ~ detect ~ ~-1 ~ stone 0 /scoreboard players set @e PigAlterProgress 1
-1

scoreboard can't have more than 15 chars so "PigAlterProgress" is too long. And indeed you must use a fill/setblock clock in those cases.

1
  • The character limit is 16, which "PigAlterProgress" falls within range of.
    – Skylinerw
    Mar 30, 2016 at 23:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .