From 9570de76a8da0a6770bf3861a1c0cb42c0a1ae67 Mon Sep 17 00:00:00 2001 From: Ralty <78720179+Raltyro@users.noreply.github.com> Date: Wed, 6 Aug 2025 05:14:33 +0700 Subject: [PATCH] Fix week7-balledLines --- assets/data/scripts/week7-balledLines.hx | 12 +++++++----- source/funkin/game/GameOverSubstate.hx | 2 ++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/assets/data/scripts/week7-balledLines.hx b/assets/data/scripts/week7-balledLines.hx index d6049a48..c09a4b4c 100644 --- a/assets/data/scripts/week7-balledLines.hx +++ b/assets/data/scripts/week7-balledLines.hx @@ -1,9 +1,11 @@ -var sound:Sound; +var sound:FlxSound; -function create() - sound = Paths.sound('jeffGameover/jeffGameover-' + FlxG.random.int(1, 25, !Options.naughtyness ? [1, 3, 8, 13, 17, 21] : null)); +function create() { + sound = FlxG.sound.load(Paths.sound('jeffGameover/jeffGameover-' + FlxG.random.int(1, 25, !Options.naughtyness ? [1, 3, 8, 13, 17, 21] : null))); + sound.onComplete = () -> FlxG.sound.music.fadeIn(4, 0.2, 1); +} -function beatHit(cur:Int) if (cur == 0) { - FlxG.sound.play(sound, 1, false, null, true, () -> if (!isEnding) FlxG.sound.music.fadeIn(4, 0.2, 1)); +function postDeathStart() { + sound.play(); FlxG.sound.music.volume = 0.2; } \ No newline at end of file diff --git a/source/funkin/game/GameOverSubstate.hx b/source/funkin/game/GameOverSubstate.hx index 56de5d26..f7ce49cc 100644 --- a/source/funkin/game/GameOverSubstate.hx +++ b/source/funkin/game/GameOverSubstate.hx @@ -115,6 +115,8 @@ class GameOverSubstate extends MusicBeatSubstate CoolUtil.playMusic(Paths.music(gameOverSong), false, 1, true, Flags.DEFAULT_BPM); character.playAnim("deathLoop", true, DANCE); cancelConductorUpdate = false; + + gameoverScript.call("postDeathStart"); } }