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

[BUGFIX] Fix scripting errors on Pico's 2hot explosion death #97

Open
wants to merge 1 commit 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
13 changes: 7 additions & 6 deletions preload/scripts/characters/pico-playable.hxc
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ class PicoPlayerCharacter extends MultiSparrowCharacter {
picoDeathExplosion = new FlxAtlasSprite(this.x - 640, this.y - 340, picoDeathExplosionPath);
PlayState.instance.subState.add(picoDeathExplosion);
picoDeathExplosion.zIndex = 1000;
picoDeathExplosion.onAnimationFinish.add(onExplosionFinishAnim);
picoDeathExplosion.onAnimationComplete.add(onExplosionFinishAnim);
picoDeathExplosion.visible = true;
this.visible = false;

Expand Down Expand Up @@ -258,16 +258,17 @@ class PicoPlayerCharacter extends MultiSparrowCharacter {
super.onAnimationFrame(name, frameNumber, frameIndex);

if (name == "firstDeath" && frameNumber == 36 - 1) {
deathSpriteRetry.animation.play('idle');
deathSpriteRetry.visible = true;
if (deathSpriteRetry != null) {
deathSpriteRetry.animation.play('idle');
deathSpriteRetry.visible = true;
deathSpriteRetry.x = this.x + 195;
deathSpriteRetry.y = this.y - 70;
}
GameOverSubState.instance.startDeathMusic(1.0, false);
// 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 🤔
GameOverSubState.instance.boyfriend.playAnimation('deathLoop');

deathSpriteRetry.x = this.x + 195;
deathSpriteRetry.y = this.y - 70;
}

if (name == "cock" && frameNumber == 3) {
Expand Down