Arqade Asked by Wii Craft on July 19, 2021
How do I make a command that basically sets var1 = var2 * var3?
Is there a way to do this in minecraft 1.8.8?
What you are looking for can be done via the aptly named scoreboard players operation
set of commands.
scoreboard players operation <targetName> <targetObjective> <operation> <selector> <objective>
This sets <targetName>
's score in <targetObjective>
based on <selector>
's score in <objective>
, according to the <operation>
.
The latter can be any of += (add), -= (subtract), *= (multiply), /= (divide), %= (modulo), = (set), < (min), > (max) or >< (swap).
In order to set var1 = var2 * var3 for "target", you can run two commands:
scoreboard players operation <target> var1 = <target> var2
scoreboard players operation <target> var1 *= <target> var3
Correct answer by MrLemon on July 19, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP