Minecraft scoreboard operation by number



  • In Minecraft Java 1.18.1 I want to operate two scoreboard with a number like:

    scoreboard players operation @p lives = (@p deaths - 3)
    

    But this command is not working, can anyone help me please?



  • scoreboard players operation @p lives -= @p 3c You need an extra objective which is a constant to do this because scoreboard operations only support scoreboard objectives, in other words, you can't utilize integers in subtraction.

    scoreboard objectives add 3c dummy
    scoreboard players set @a 3c 3
    

    Hope this helps.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2