Skip to content

Fix scared animation from lightning strikes preventing forced song event animations from playing #171

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

VioletSnowLeopard
Copy link
Contributor

Fixes FunkinCrew/Funkin#4376

It seems that Kade attempted to fix this issue in this commit, but this change doesn't work if the lightning strike happens to occur on the same beat that Boyfriend plays the cheer animation. In fact, even without this change, the cheer animation works correctly if the lightning strike happens on the beat directly before or after the animation. The issue only occurs if they happen on the same beat.

The change from the aforementioned commit doesn't work because the stage script is processed before song events from the chart data. This means that Boyfriend hasn't tried to play the cheer animation yet, so getBoyfriend().animation.name != 'cheer' won't work to prevent this.

This PR fixes the issue by getting all forced PlayAnimation events which target boyfriend. Then when a lightning strike happens, the script checks whether any of these events happen on the current beat. If there is an event that should play on the current beat, this means that the boyfriend character has a forced animation to play, so they won't play the scared animation.

Video Comparison

Here is a video of a lighting strike playing on the exact same beat as the cheer animation before the change from this PR:

lightning-interrupt.mp4

Here is a video of the same after the change from this PR:

cheer-not-interrupted.mp4

@Hundrec Hundrec added the type: minor bug Involves a minor bug or issue. label Apr 28, 2025
@VioletSnowLeopard VioletSnowLeopard force-pushed the scared-anim-does-not-interrupt-song-event-anims branch from 40d91f9 to 5f7acaf Compare April 28, 2025 03:47
@Hundrec Hundrec added status: pending triage Awaiting review. size: medium A medium pull request with 100 or fewer changes. labels Apr 28, 2025
@VioletSnowLeopard VioletSnowLeopard force-pushed the scared-anim-does-not-interrupt-song-event-anims branch from 5f7acaf to 971ce22 Compare April 28, 2025 12:16
@EliteMasterEric EliteMasterEric changed the base branch from 0.6.3-release to main April 30, 2025 06:04
@Hundrec Hundrec added pr: art PR modifies art or animations. topic: art and animation Related to visual details and errors in the game. pr: hscript PR modifies game scripts. and removed pr: art PR modifies art or animations. labels Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: hscript PR modifies game scripts. size: medium A medium pull request with 100 or fewer changes. status: pending triage Awaiting review. topic: art and animation Related to visual details and errors in the game. type: minor bug Involves a minor bug or issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug Report: Boyfriend's special animation in Spookeez can be interrupted by a lightning strike
2 participants