From 6e730c4b778b540b4188ab03e7a71adc9eeb9454 Mon Sep 17 00:00:00 2001 From: Abnormal <86753001+AbnormalPoof@users.noreply.github.com> Date: Thu, 31 Oct 2024 20:51:33 +0000 Subject: [PATCH] fix explosion death --- preload/scripts/characters/pico-playable.hxc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/preload/scripts/characters/pico-playable.hxc b/preload/scripts/characters/pico-playable.hxc index f7f31c3e..d09da6ef 100644 --- a/preload/scripts/characters/pico-playable.hxc +++ b/preload/scripts/characters/pico-playable.hxc @@ -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; @@ -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) {