Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the game over music loop for pico's explosion the default #112

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion preload/scripts/characters/pico-playable.hxc
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ class PicoPlayerCharacter extends MultiSparrowCharacter {
if (GameOverSubState.blueBallSuffix == '-pico-explode') {
// Explosion death animation.
doExplosionDeath();
return; // Don't play the stab death animation, sure, pico is set as invisible, but still good to do this
} else {
// Standard death animation.
createDeathSprites();
Expand Down Expand Up @@ -245,7 +246,6 @@ class PicoPlayerCharacter extends MultiSparrowCharacter {
clearCasings();

// Reset to standard death animation.
GameOverSubState.musicSuffix = '-pico';
GameOverSubState.blueBallSuffix = '-pico';

PauseSubState.musicSuffix = '-pico';
Expand All @@ -261,6 +261,8 @@ class PicoPlayerCharacter extends MultiSparrowCharacter {
deathSpriteRetry.animation.play('idle');
deathSpriteRetry.visible = true;
GameOverSubState.instance.startDeathMusic(1.0, false);
// set the game over music to the default to make it loop properly
GameOverSubState.musicSuffix = '-pico';
// force the deathloop to play in here, since we are starting the music early it
// doesn't check this in gameover substate !
// also no animation suffix 🤔
Expand Down