scoreboard好像只能存储整数,那有什么办法可以解决需要更高精度的运算的情况呢,比如说,我要把我和一只猪的坐标差值存储到猪的Motion标签中。
复制代码shoot_target=1是我自己 shoot_target=2是那只猪,除了这只猪以外没有别的猪,下面的Motion信息是在同一个函数里的tellraw打印的,没有延迟
我知道可以将这个差值放大存到积分项里,再缩小存到Motion标签里,但是在实际试的时候发现跟我想的不太一样,x轴的差值是

但是存储的结果是这样

存入之后x轴是0
命令是这样的
- execute as @e[scores={shoot_target=1},limit=1] store result entity @s Motion[0] double 0.1 run scoreboard players get @e[scores={shoot_target=2},limit=1] posituon_x
所以,这是因为命令写错了还是我哪里想错了
execute as @e[scores={shoot_target=1},limit=1] store result entity @s Motion[0] double 0.1 run scoreboard players get @e[scores={shoot_target=2},limit=1] posituon_x
晴路卡 发表于 2021-4-5 10:13
拼写错误,另外这个值对于Motion来说太大了
确实是写错了,谢谢