25 lines
2.6 KiB
Mcfunction
25 lines
2.6 KiB
Mcfunction
execute as @s[scores={emk-timer=-2}] run function emk:race/reset
|
|
execute as @s[scores={emk-timer=-3}] as @a[distance=..500] at @s run tp @s ~ ~ ~
|
|
execute as @s[scores={emk-timer=-3}] run tp @e[tag=emk-seat,distance=..500] ~ -100 ~
|
|
execute unless entity @e[tag=emk-kart,tag=!emk-finished,distance=..500] run scoreboard players set @s[scores={emk-timer=0}] emk-timer -122
|
|
execute if score @s emk-timer matches 160 run title @a[distance=..500] times 5 65 10
|
|
execute if score @s emk-timer matches 160 run title @a[distance=..500] title {"selector":"@s","color":"#ffcc66"}
|
|
execute if score @s emk-timer matches 160 run title @a[distance=..500] subtitle {"text":"Enter your kart!","color":"#33aaff"}
|
|
#execute if score @s emk-timer matches 101 run title @a[distance=..500] times 0 0 20
|
|
#execute if score @s emk-timer matches 101 run title @a[distance=..500] title {"text":"Starting in 5","color":"#ffaa00"}
|
|
#execute if score @s emk-timer matches 81 run title @a[distance=..500] times 0 0 20
|
|
#execute if score @s emk-timer matches 81 run title @a[distance=..500] title {"text":"Starting in 4","color":"#ffaa00"}
|
|
execute if score @s emk-timer matches 61 run title @a[distance=..500] times 0 12 7
|
|
execute if score @s emk-timer matches 61 run title @a[distance=..500] title {"text":"Starting in 3","color":"#ffaa00"}
|
|
execute if score @s emk-timer matches 41 run title @a[distance=..500] times 0 12 7
|
|
execute if score @s emk-timer matches 41 run title @a[distance=..500] title {"text":"Starting in 2","color":"#ffaa00"}
|
|
execute if score @s emk-timer matches 21 run title @a[distance=..500] times 0 12 7
|
|
execute if score @s emk-timer matches 21 run title @a[distance=..500] title {"text":"Starting in 1","color":"#ffaa00"}
|
|
execute if score @s emk-timer matches 1 run title @a[distance=..500] times 0 20 20
|
|
execute if score @s emk-timer matches 1 run title @a[distance=..500] title {"text":"Go!","color":"#22ff22"}
|
|
execute if score @s emk-timer matches ..200 unless score @s emk-timer matches ..20 unless score @s emk-timer matches 22..40 unless score @s emk-timer matches 42..60 unless score @s emk-timer matches 62.. as @a[distance=..500] at @s run playsound minecraft:entity.experience_orb.pickup ambient @s ~ ~ ~ 1 .5
|
|
execute if score @s emk-timer matches 1 as @a[distance=..500] at @s run playsound minecraft:entity.experience_orb.pickup ambient @s ~ ~ ~ 1 .75
|
|
#Not pretty but stops the karts at least
|
|
execute if score @s emk-timer matches 1.. run scoreboard players set @e[tag=emk-kart,distance=..500] emk-stun 1
|
|
scoreboard players add @s[scores={emk-timer=..-2}] emk-timer 1
|
|
scoreboard players remove @s[scores={emk-timer=1..}] emk-timer 1 |