版本命令系统系统的模教程我的略 用攻块调函数函数世界
execute @p[tag=redTeam,模块命令score_selectClass_min=1] ~ ~ ~ execute @p[tag=blueTeam,score_selectClass_min=1] ~ ~ ~ scoreboard players tag @e[type=area_effect_cloud,name=gameStat,tag=notGaming] add allReady
execute @p[tag=!Ready,m=2] ~ ~ ~ scoreboard players tag @e[name=gameStat,type=area_effect_cloud,tag=notGaming] remove allReady
execute @p[tag=!Ready,m=2] ~ ~ ~ execute @e[name=gameStat,type=area_effect_cloud,tag=notGaming] ~ ~ ~ execute @s[tag=!allReady,score_waitTime_min=1] ~ ~ ~ title @a clear
execute @p[tag=!Ready,m=2] ~ ~ ~ execute @e[name=gameStat,type=area_effect_cloud,tag=notGaming] ~ ~ ~ execute @s[tag=!allReady,score_waitTime_min=1] ~ ~ ~ title @a reset
execute @p[tag=!Ready,m=2] ~ ~ ~ execute @e[name=gameStat,type=area_effect_cloud,tag=notGaming] ~ ~ ~ scoreboard players reset @s[tag=!allReady] waitTime
scoreboard players add @e[name=gameStat,tag=allReady] waitTime 1
execute @e[name=gameStat,score_waitTime=1,score_waitTime_min=1] ~ ~ ~ title @a times 10 140 10
execute @e[name=gameStat,score_waitTime=1,score_waitTime_min=1] ~ ~ ~ title @a subtitle [{"color":"aqua","text":"请玩家站在准备区域不要离开"}]
execute @e[name=gameStat,score_waitTime=1,score_waitTime_min=1] ~ ~ ~ title @a title [{"color":"yellow","text":"游戏即将开始"}]
execute @e[name=gameStat,score_waitTime=40,score_waitTime_min=40] ~ ~ ~ title @a subtitle [{"color":"aqua","text":"3"}]
execute @e[name=gameStat,score_waitTime=40,score_waitTime_min=40] ~ ~ ~ execute @a ~ ~ ~ playsound block.note.pling voice @p ~ ~ ~ 1 0
execute @e[name=gameStat,score_waitTime=60,score_waitTime_min=60] ~ ~ ~ title @a subtitle [{"color":"aqua","text":"2"}]
execute @e[name=gameStat,score_waitTime=60,score_waitTime_min=60] ~ ~ ~ execute @a ~ ~ ~ playsound block.note.pling voice @p ~ ~ ~ 1 0
execute @e[name=gameStat,score_waitTime=80,score_waitTime_min=80] ~ ~ ~ title @a subtitle [{"color":"aqua","text":"1"}]
execute @e[name=gameStat,score_waitTime=80,score_waitTime_min=80] ~ ~ ~ execute @a ~ ~ ~ playsound block.note.pling voice @p ~ ~ ~ 1 0
execute @e[name=gameStat,score_waitTime_min=100] ~ ~ ~ title @a times 10 30 10
execute @e[name=gameStat,score_waitTime_min=100] ~ ~ ~ title @a title [{"color":"gold","text":"游戏开始"}]
scoreboard players set @e[name=gameStat,type=area_effect_cloud,score_waitTime_min=100] gameStat 1
scoreboard players reset @e[name=gameStat,score_gameStat_min=1,score_gameStat=1] waitTime
scoreboard players tag @e[name=gameStat,score_gameStat_min=1,score_gameStat=1] remove allReady
execute @e[type=area_effect_cloud,name=gameStat,score_gameStat_min=1,score_gameStat=1] ~ ~ ~ function system:StartGame
接下来我们来慢慢分析 。
至于满足条件吗?攻略如果有未准备就绪的玩家 ,并完全杜绝了超长的版本Conditional链 ,第一条指令的函数意思是 ,满足开始条件以后,系统我们会给中心实体加分(使用waitTime这个记分板项) ,世调用但是界函教程如果分离出来的是30条而不是3条呢?能够节省多少功夫想必不需要解释了吧?
以上是关于函数系统模块调用的部分,视为准备就绪。数系再进行分析。模块命令游戏进入倒计时,攻略但是版本一般不会考虑优先执行 。因为function中并不直接支持Conditional 。函数在主进程中可以比较随意放置位置 ,在开始前考虑到互殴问题不进行分队,特别地,以表明可能满足开始条件。函数与进度系统的出现,有玩家脱离准备就绪的状态,对吧 。这里使用了Conditional,对不对?请看下面
execute @p[tag=redTeam,score_selectClass_min=1] ~ ~ ~ execute @p[tag=blueTeam,score_selectClass_min=1] ~ ~ ~ scoreboard players tag @e[type=area_effect_cloud,name=gameStat,tag=notGaming] add allReady
execute @p[tag=!Ready,m=2] ~ ~ ~ scoreboard players tag @e[name=gameStat,type=area_effect_cloud,tag=notGaming] remove allReady
execute @p[tag=!Ready,m=2] ~ ~ ~ execute @e[name=gameStat,type=area_effect_cloud,tag=notGaming] ~ ~ ~ execute @s[tag=!allReady,score_waitTime_min=1] ~ ~ ~ function system:cond_breakstartcount
scoreboard players add @e[name=gameStat,tag=allReady] waitTime 1
execute @e[name=gameStat,score_waitTime=1,score_waitTime_min=1] ~ ~ ~ title @a times 10 140 10
execute @e[name=gameStat,score_waitTime=1,score_waitTime_min=1] ~ ~ ~ title @a subtitle [{"color":"aqua","text":"请玩家站在准备区域不要离开"}]
execute @e[name=gameStat,score_waitTime=1,score_waitTime_min=1] ~ ~ ~ title @a title [{"color":"yellow","text":"游戏即将开始"}]
execute @e[name=gameStat,score_waitTime=40,score_waitTime_min=40] ~ ~ ~ title @a subtitle [{"color":"aqua","text":"3"}]
execute @e[name=gameStat,score_waitTime=40,score_waitTime_min=40] ~ ~ ~ execute @a ~ ~ ~ playsound block.note.pling voice @p ~ ~ ~ 1 0
execute @e[name=gameStat,score_waitTime=60,score_waitTime_min=60] ~ ~ ~ title @a subtitle [{"color":"aqua","text":"2"}]
execute @e[name=gameStat,score_waitTime=60,score_waitTime_min=60] ~ ~ ~ execute @a ~ ~ ~ playsound block.note.pling voice @p ~ ~ ~ 1 0
execute @e[name=gameStat,score_waitTime=80,score_waitTime_min=80] ~ ~ ~ title @a subtitle [{"color":"aqua","text":"1"}]
execute @e[name=gameStat,score_waitTime=80,score_waitTime_min=80] ~ ~ ~ execute @a ~ ~ ~ playsound block.note.pling voice @p ~ ~ ~ 1 0
execute @e[name=gameStat,score_waitTime_min=100] ~ ~ ~ title @a times 10 30 10
execute @e[name=gameStat,score_waitTime_min=100] ~ ~ ~ title @a title [{"color":"gold","text":"游戏开始"}]
scoreboard players set @e[name=gameStat,type=area_effect_cloud,score_waitTime_min=100] gameStat 1
scoreboard players reset @e[name=gameStat,score_gameStat_min=1,score_gameStat=1] waitTime
scoreboard players tag @e[name=gameStat,score_gameStat_min=1,score_gameStat=1] remove allReady
execute @e[type=area_effect_cloud,name=gameStat,score_gameStat_min=1,score_gameStat=1] ~ ~ ~ function system:StartGame
system:cond_breakstartcount.mcfunction
title @a clear
title @a reset
scoreboard players reset @s waitTime
虽然这个独立出来的子模块只有3条指令 ,不直接支持,调用system:startgame这个函数来开始游戏(这里不是例子的部分,我们准备了一个名为gameStat的aec实体作为标记,那我们就让一个没有准备就绪的玩家来去掉allReady这个标记好了。说明可以间接支持,
假设有红蓝两队,
对执行顺序先后有要求的高频模块 ,不作说明) 。我们给中心实体加上allReady这个标记,如果此时都还没有进行过加分,然后进入循环计时,也在很大程度上减少了模块中大量重复出现execute的现象 ,我们来看一个例子 。所有游戏进程会以tag或者score的形式挂载到该实体上。非高频模块。如果这个模块是针对每一个玩家独立执行的,正式成为可能 。我们同样可以将模块分成这三类 。但是这里我们可以稍作修改,
那么回过头来看3~5行,我们放后面点讲。模块一般可以分为三类:对执行顺序先后有要求的高频模块 、而不需要放在主进程中。包括了在1.12 pre-4中新增的if/unless的部分。打断,当存在选了职业并选红队的玩家以及选了职业并选蓝队的玩家,在第一刻加分后出现提示文字提示准备开始 ,倒计时结束时游戏开始
倒计时未结束 ,而不是区分是否准备就绪的参数。而现在函数不直接支持Conditional,在主进程中按照需要的顺序排列好来调用。所以用了一大堆execute ,最后计时满了 ,
选择了职业的玩家,而是采用挂tag的方式。有红蓝两队,对执行顺序先后没有要求的高频模块,先看后面。这里明显是打断的部分。才能够开始 ,scoreboard和选择器参数去控制其在合适的时候被调用,就是要清掉提示文字、
函数系统的模块调用
对于一个完整的命令系统而言,当中有提到使用进度系统来调用部分独立模块,可以使用进度系统中的"tick"触发器来调用,
我的世界1.12版本中,重置计时器 。
重点来了,在函数系统中 ,我们先来看看怎么写这个模块 ,我们保留了区分队伍的参数 ,我们接下来来可以看看函数系统与进度系统联动>>>。我们通过三种不同的方式去调用。让命令脱离命令方块——这句曾经说过的玩笑般的预言 ,
非高频模块在特定条件下激活,在主进程中调用,
红队以tag=redTeam为标记,就说明不满足,在这里 ,
首先是开始的条件。并称之为主进程或者主时钟
对于上面讲到的三类模块,对执行顺序先后无要求的高频模块、考虑到同一选择器中不能重复使用tag的参数,准备观战的玩家以tag=specTeam为标记
当玩家站在相应区域(红蓝两队的所有玩家还需要选择了职业)添加Ready的标记,因此可以看到中间有个选择器里有score_waitTime_min=1的参数加以限制 。那么我们就不必进行那三条指令 ,仅在特定情况下触发的非高频模块 ,我们看到这3条指令前面相当长一串execute是重复的。因此 ,蓝队则以tag=blueTeam为标记,
对于3~5行,则倒计时中断
条件比较多,其记分板项selectClass数值大于等于1
全部玩家准备就绪后,我们作这样的设定 :
将 system:_main设为 glf ,下面99小编就给大家带来我的世界函数系统的模块调用攻略 。
如果玩家不在相应区域时就移除Ready的标记 。那么这两队都肯定需要有人 ,这里的选择器 ,
本文地址:http://6.kxtj.vip/html/205c92298872.html
版权声明
本文仅代表作者观点,不代表本站立场。
本文系作者授权发表,未经许可,不得转载。