天天动画片 > 八卦谈 > 我的世界/scoreboard指令详细使用及作用!简单易懂![Minecraft][MC]

我的世界/scoreboard指令详细使用及作用!简单易懂![Minecraft][MC]

八卦谈 佚名 2023-04-26 12:16:56

语法:

/scoreboard [objectives/players] <参数> <参数> <...>

objectives是一个项,players是玩家

objectives后面有这几个参数:add/list/modify/remove/setdisplay

也就是新增/列出/修改/移除/设置显示位置

add 后面给计分板起一个名,再后面设置计分板的准则,再设置显示名称

例如:/scoreboard objectives add hh dummy "'hh"

创建一个计分板项hh,它的显示名字也为hh

list就是列出所有已创建的计分板项

modify修改计分板的显示名称或者显示样式

/scoreboard objectives modify hh displayname "'wd"

设置hh计分板项的显示名称为wd

/scoreboard objectives modify hh rendertype hearts

设置hh计分板项为爱心的样式显示(hearts是爱心,integer是数字)

remove移除计分板

/scoreboard objectives remove hh

移除计分板hh

setdisplay设置计分板的显示位置

/scoreboard objectives setdisplay sidebar hh

设置hh计分板显示在右侧(sidebar是右侧,belowName是自己头上,list是按快捷键Tab看到的玩家列表,sidebar.team.<颜色>设置只有某一颜色的队伍能看见)

players

add增加玩家的分数

/scoreboard players add HeiLong_999 hh 1

增加玩家HeiLong_999的hh积分项1

enable设置谁能用/trigger修改计分板的分数

/scoreboard players enable @a hh

设置所有人能用/trigger修改计分板的分数

get显示分数

/scoreboard players get HeiLong_999 hh

显示HeiLong_999的hh分数

list列出分数

/scoreboard players list HeiLong_999

列出HeiLong_999的所有计分板的所有分数

operation计算分数

/scoreboard players operation HeiLong_999 hh %= HeiLong_999 hh

设置HeiLong_999取模HeiLong_999的分数

/scoreboard players operation HeiLong_999 hh *= HeiLong_999 hh

设置HeiLong_999的分数乘HeiLong_999的分数

%=取模,*=乘,+=加,-=减,/=除,<取较小值,=等于,>取较大值,><交换分数

remove减少分数

/scoreboard players remove HeiLong_999 hh 1

设置HeiLong_999的分数减少1

reset清空分数,移除目标从积分项

/scoreboard players reset HeiLong_999 hh

移除HeiLong_999的hh积分项,并设置为默认分数(0)

set设置分数

/scoreboard players set HeiLong_999 hh 10

设置HeiLong_999的分数为10

高级使用:

准则:

dummy虚拟的

trigger通过/trigger修改的

deathCount死亡次数

playerKillCount杀死总玩家

totalKillCount杀死总生物

health血量

xp经验

level等级

food饱和度

air潜水剩的空气

armor盔甲值

复合准则:

teamkill.<颜色>杀死特定颜色的队伍玩家

killedByTeam.<颜色>被特定队伍的玩家杀死

minecraft.custom:<objective>设置多个准则

minecraft.picked_up:<物品>捡起物品

minecraft.dropped:<物品>掉落物品

minecraft.used:<物品>使用物品

minecraft.broken:<物品>破坏物品

minecraft.crafted:<物品>合成物品

minecraft.mined:<物品>挖掘物品

minecraft.killed:<实体>杀死指定实体

minecraft.killed_by:<实体>被指定的实体杀死

示例:/scoreboard objectives add 1 minecraft.custom:minecraft.sneak_time

新增一个潜行增加分数的积分项

其他:

/scoreboard players set @a[scores={hh=10}] hh 0

积分项hh分数为10的玩家修改为0

/scoreboard players set @a[scores={hh=10..100000000}] hh 0

积分项hh分数在10-100000000的玩家修改为0

/scoreboard players set @a[scores={hh=-1000000..0}] hh 0

积分项hh分数在-1000000-0的玩家修改为0

/execute if score HeiLong_999 hh matches 1..100 run give HeiLong_999 minecraft:apple 1

检测如果HeiLong_999的积分项hh为1-100则给HeiLong_999一个苹果

/execute unless score HeiLong_999 hh matches -10000..10000 run give HeiLong_999 minecraft:apple 1

检测HeiLong_999的积分项如果不是-10000-10000则给HeiLong_999一个苹果

/execute if score HeiLong_999 hh = HeiLong_999 hh run give HeiLong_999 minecraft:apple 1

如果HeiLong_999的分数跟HeiLong_999的分数相同,则给HeiLong_999一个苹果

个人制作,请勿转载!

往期专栏:


本文标题:我的世界/scoreboard指令详细使用及作用!简单易懂![Minecraft][MC] - 八卦谈
本文地址:www.ttdhp.com/article/28983.html

天天动画片声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
扫码关注我们