第一个:当我们创建了一个计分板
/scoreboard objectives add motion dummy
然后召唤一个有test标签的盔甲架,然后把它的motion分数设置为1
,然后输入下列指令,他为什么不会跳起来,却原地不动
execute as @e[tag=text] at @s store result entity @s Motion[1] int 1 run scoreboard players get @s motion
第二个:当我们召唤出一个盔甲架,继续使用上面的计分板
summon armor_stand ~ ~1 ~ {Pose:{Head:[0f,10f,0f],Body:[0f,0f,0f],LeftArm:[0f,0f,0f],RightArm:[0f,0f,0f],LeftLeg:[0f,0f,0f],RightLeg:[0f,0f,0f]},Rotation:[0f,0f],ArmorItems:[{},{},{},{id:"minecraft:stick",Count:1b,Damage:0s,tag:{display:{}}}]}
我让他的motion分数不断+1,到180时重置,如何将这些分数获取到他的Pose:{Head:[0f,10f,0f]}第二个里面
 本帖最后由 Chelover_C60 于 2021-2-3 15:49 编辑 
Motion是double,不是int,注意后面的d
问题1
复制代码
问题2
复制代码
Motion是double,不是int,注意后面的d
Motion: [0.0d, 0.0d, 0.0d]
问题1
- execute as @e[tag=text] at @s store result entity @s Motion[1] double 1 run scoreboard players get @s motion
问题2
- execute as @e[type=armor_stand] at @s store result entity @s Pose.Head[1] float 1 run scoreboard players get @s motion
第一个,指令修改:
复制代码
去掉了多余的at @s,并修改了数据储存的错误格式(motion的储存格式为double,并非int)
复制代码
- /execute as @e[tag=text] store result entity @s Motion[1] double 1 run scoreboard players get @s motion
去掉了多余的at @s,并修改了数据储存的错误格式(motion的储存格式为double,并非int)
- /execute as @e[type=minecraft:armor_stand] store result entity @s Pose.Head[1] float 1 run scoreboard players get @s motion