-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MagmaRun: Added post-start timer to tell player start to run
- Loading branch information
Showing
4 changed files
with
32 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
|
||
function #magma_run:destroy_sand | ||
function #magma_run:fall | ||
|
||
execute at @a[team=magma_run] as @e[tag=lobby.horse,distance=..3] run function lobby:horse/kill | ||
|
||
execute if score $magma_run.post_start_timer data matches ..0 run function #magma_run:destroy_sand | ||
execute if score $magma_run.post_start_timer data matches ..0 run function #magma_run:fall | ||
function #magma_run:stop | ||
|
||
execute at @a[team=magma_run] as @e[tag=lobby.horse,distance=..3] run function lobby:horse/kill | ||
execute if score $magma_run.post_start_timer data matches 0.. run function magma_run:start/post_start |
17 changes: 17 additions & 0 deletions
17
minigames/data/magma_run/functions/start/post_start.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
scoreboard players remove $magma_run.post_start_timer data 1 | ||
|
||
scoreboard players operation $magma_run.post_start_timer.seconds data = $magma_run.post_start_timer data | ||
scoreboard players operation $magma_run.post_start_timer.seconds data /= 20 const | ||
scoreboard players add $magma_run.post_start_timer.seconds data 1 | ||
|
||
|
||
execute if score $magma_run.post_start_timer data matches 0..60 run title @a[team=magma_run] title {"score":{"name":"$magma_run.post_start_timer.seconds","objective":"data"},"color":"gold","bold":true,"italic":true} | ||
|
||
execute if score $magma_run.post_start_timer data matches 0 run title @a[team=magma_run] title {"text":""} | ||
execute if score $magma_run.post_start_timer data matches 0 run title @a[team=magma_run] subtitle {"text":""} | ||
|
||
execute if score $magma_run.post_start_timer data matches 60 as @a[team=magma_run] at @s run playsound minecraft:entity.experience_orb.pickup master @s ~ ~ ~ 1 1 0 | ||
execute if score $magma_run.post_start_timer data matches 40 as @a[team=magma_run] at @s run playsound minecraft:entity.experience_orb.pickup master @s ~ ~ ~ 1 1 0 | ||
execute if score $magma_run.post_start_timer data matches 20 as @a[team=magma_run] at @s run playsound minecraft:entity.experience_orb.pickup master @s ~ ~ ~ 1 1 0 | ||
execute if score $magma_run.post_start_timer data matches 0 as @a[team=magma_run] at @s run playsound minecraft:entity.experience_orb.pickup master @s ~ ~ ~ 1 2 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters