Skip to content

Commit

Permalink
Prophunt: Title at start + WIP ping refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
VForiel committed Feb 3, 2024
1 parent a6d2c18 commit bde9531
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 7 deletions.
10 changes: 10 additions & 0 deletions minigames/data/prophunt/functions/ping/effect.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Executed as and at the pinging player
# tellraw @a {"text":"prophunt:ping/run"}


effect give @s glowing 1 1 true
summon block_display ~ ~ ~ {Glowing:1b,block_state:{Name:"minecraft:air"},Tags:["prophunt.ping","prophunt.ping.new"]}
team join prophunt @e[type=block_display,tag=prophunt.ping.new]
scoreboard players set @
playsound minecraft:block.note_block.bell master @a[tag=prophunt.is_hunter] ~ ~ ~ 2 1 1
scoreboard players set @s prophunt.use_item_trigger 0
7 changes: 7 additions & 0 deletions minigames/data/prophunt/functions/ping/raycast.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Executed as and at the pinging player
# tellraw @a {"text":"prophunt:ping/raycast"}

scoreboard players remove #prophunt.ping.raycast ctx 1
execute if score #prophunt.ping.raycast ctx matches 1.. if block ~ ~ ~ air positioned ^ ^ ^0.5 run function prophunt:ping/raycast
execute unless block ~ ~ ~ air align xyz positioned ~ ~0.5 ~ run function prophunt:ping/effect
execute if score #prophunt.ping.raycast ctx matches ..0 align xyz positioned ~ ~0.5 ~ run function prophunt:ping/effect
6 changes: 0 additions & 6 deletions minigames/data/prophunt/functions/ping/run.mcfunction

This file was deleted.

3 changes: 2 additions & 1 deletion minigames/data/prophunt/functions/ping/trigger.mcfunction
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Executed globally
# tellraw @a {"text":"prophunt:ping/trigger"}

execute as @a[tag=prophunt.is_hunter,scores={prophunt.use_item_trigger=1..}] at @s run function prophunt:ping/run
execute as @a[tag=prophunt.is_hunter,scores={prophunt.use_item_trigger=1..}] at @s run scoreboard players set #prophunt.ping.raycast ctx 50
execute as @a[tag=prophunt.is_hunter,scores={prophunt.use_item_trigger=1..}] at @s run function prophunt:ping/raycast
6 changes: 6 additions & 0 deletions minigames/data/prophunt/functions/start/start.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ stopsound @a[team=prophunt] record
execute as @a[team=prophunt] at @s run playsound prophunt:theme record @s
tellraw @a[team=prophunt] {"text":"Music by Ashot Danielyan","hoverEvent":{"action":"show_text","value":[{"text":"Played on the \"record\" audio source"}]}}

title @a[team=prophunt] times 0 100 20
title @a[team=prophunt,tag=prophunt.is_prop] title {"text":"Prop","color":"blue","bold":true,"italic":true}
title @a[team=prophunt,tag=prophunt.is_prop] subtitle {"text":"Find a place to hide!","color":"blue"}
title @a[team=prophunt,tag=prophunt.is_hunter] title {"text":"Hunter","color":"red","bold":true,"italic":true}
title @a[team=prophunt,tag=prophunt.is_hunter] subtitle {"text":"Find all the props!","color":"red"}

# execute as @a[team=prophunt] at @s run function #global:animated_title {type:"start"}

tp @e[team=prophunt,tag=prophunt.is_hunter] 134 88 59
Expand Down

0 comments on commit bde9531

Please sign in to comment.