فهرست منبع

计数排除旁观者

00ll00 6 سال پیش
والد
کامیت
49db9ada11
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      data/mini/functions/main/player_failed.mcfunction
  2. 1 1
      data/mini/functions/main/player_finished.mcfunction

+ 1 - 1
data/mini/functions/main/player_failed.mcfunction

@@ -2,7 +2,7 @@
 
 # 计数
 tag @s remove mini_running
-execute store result score $t_alive mem if entity @a[tag=mini_running]
+execute store result score $t_alive mem if entity @a[tag=mini_running,tag=!hub_watch]
 execute if score $t_alive mem matches 1.. run tellraw @a [{"selector": "@s","color":"red"}," 已失败! 剩余 ",{"score": {"name": "$t_alive","objective": "mem"}}," 人!"]
 
 # 给存活的玩减分

+ 1 - 1
data/mini/functions/main/player_finished.mcfunction

@@ -2,7 +2,7 @@
 
 # 计数
 tag @s remove mini_running
-execute store result score $t_finish mem if entity @a[tag=!mini_running]
+execute store result score $t_finish mem if entity @a[tag=!mini_running,tag=!hub_watch]
 execute if score $t_finish mem matches ..3 run tellraw @a [{"selector": "@s","color":"green"}," 已成功! 第 ",{"score": {"name": "$t_finish","objective": "mem"}}," 名!"]
 
 # 给已完成的玩家加分