What is the 1.12 equivalent of /execute if score?
-
In Minecraft, I want a command to execute when a score is changed.
For example, I have a scoreholder named
cameraactive
on an objective namedDebug
. I want a command to run when this score becomes 1.I know that Minecraft Java 1.13+ has this command:
execute if score Cameraactive Debug matches 1 run say hi
Is there a way to mimic this in 1.12.2? I'm using several mods that don't support 1.13 and above and I don't have the option to upgrade versions.
-
The equivalent to 1.13+'s
/execute if score
is the command/scoreboard players test
:scoreboard players test
For example, with scoreholder
$debug.camera_active
and objectivemain
, the command is:scoreboard players test $debug.camera_active 1 1
Then you would follow with a chain command block, set to conditional mode, that runs whatever comes next.