Skip to content

Commit

Permalink
Added music themes the game
Browse files Browse the repository at this point in the history
  • Loading branch information
VForiel committed Oct 10, 2023
1 parent b17c8aa commit 5445f12
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ execute unless score #lava.period.tick options matches 0 run function scaffoldin
execute if score #flag.take_over options matches 1 run function scaffolding_rush:game/flag/__main__
execute if score Volcano options matches 1 run function scaffolding_rush:game/volcano/__main__

function scaffolding_rush:game/music/__main__

# =====================================

#can place on
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ scoreboard players set @a listener.use.green_spawn_egg 0
scoreboard players set @a listener.use.red_spawn_egg 0
scoreboard players set @a listener.use.yellow_spawn_egg 0

function scaffolding_rush:game/music/__start__

#reset flaghunt timer
execute unless score #flag.take_over options matches 0 run scoreboard players set #flag.take_overCountdown data 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ kill @e[tag=Volcano]

execute if score UseTimeLimit options matches 1.. run function scaffolding_rush:game/score_elimination

function scaffolding_rush:game/music/__stop__

# Finish message --------------------------------------------------------------

scoreboard players set TeamWin data 0
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

scoreboard players remove #game.music.timer timer 1
execute if score #game.music.timer timer matches ..-1 run function scaffolding_rush:game/music/next
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

# Take a random music depending of if it's a normal or hardcore mode
execute if score Preset options matches 1..2 store result score #game.music.current data run random value 1..3
execute if score Preset options matches 3..4 store result score #game.music.current data run random value 4..5
execute if score Preset options matches 5..7 store result score #game.music.current data run random value 1..3

function scaffolding_rush:game/music/next
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

stopsound @a music
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

stopsound @a music
scoreboard players add #game.music.current data 1

# Looping over classical musics
execute if score #game.music.current data matches 4 run scoreboard players set #game.music.current data 1
# Looping over hardcore musics
execute if score #game.music.current data matches 6 run scoreboard players set #game.music.current data 4

execute if score #game.music.current data matches 1 run scoreboard players set #game.music.timer timer 4780
execute if score #game.music.current data matches 1 as @a at @s run playsound blazing_scaffolding:classic_theme_1 music @s ~ ~ ~ 0.5 1 0

execute if score #game.music.current data matches 2 run scoreboard players set #game.music.timer timer 3200
execute if score #game.music.current data matches 2 as @a at @s run playsound blazing_scaffolding:classic_theme_2 music @s ~ ~ ~ 0.5 1 0

execute if score #game.music.current data matches 3 run scoreboard players set #game.music.timer timer 3100
execute if score #game.music.current data matches 3 as @a at @s run playsound blazing_scaffolding:classic_theme_3 music @s ~ ~ ~ 0.5 1 0

execute if score #game.music.current data matches 4 run scoreboard players set #game.music.timer timer 1900
execute if score #game.music.current data matches 4 as @a at @s run playsound blazing_scaffolding:hardcore_theme_1 music @s ~ ~ ~ 0.5 1 0

execute if score #game.music.current data matches 5 run scoreboard players set #game.music.timer timer 2380
execute if score #game.music.current data matches 5 as @a at @s run playsound blazing_scaffolding:hardcore_theme_2 music @s ~ ~ ~ 0.5 1 0
Binary file modified level.dat
Binary file not shown.
Binary file modified resources.zip
Binary file not shown.

0 comments on commit 5445f12

Please sign in to comment.