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

Bug Report: Hold note covers' splash animation don't follow the strumline's position when changing it #4091

Open
3 tasks done
MAZ12211 opened this issue Feb 3, 2025 · 4 comments
Labels
status: pending triage Awaiting review. type: minor bug Involves a minor bug or issue.

Comments

@MAZ12211
Copy link

MAZ12211 commented Feb 3, 2025

Issue Checklist

  • I have read the pinned Issues Guide
  • I have checked the Issues/Discussions pages to see if my issue has already been reported
  • I have properly named my issue

Platform

Itch.io (Downloadable Build) - Windows

Browser

None

Version

0.5.3

Description (include any images, videos, errors, or crash logs)

If you make script for changing the strumline's position depending on difficulty, the hold note cover splash animation doesn't update its position if you change the difficulty through the pause menu.

8mb.video-A66-AEbDELjJ.mp4

Steps to Reproduce

  1. Make a script in a mod that changes the strumline's position depending on the difficulty.
  2. Change to the previous difficulty after the strumline's position has been changed through the pause menu.

Here's the code to save your time.

import funkin.play.PlayState;
import funkin.play.song.Song;
import flixel.FlxG;
import funkin.util.Constants;

class highLiveVocalSong extends Song {
    function new() {
        super('high-live-vocal');
    }

    function updateStrumlinePos() {
        var playerStrumline:FlxSprite = PlayState.instance.playerStrumline;
        var opponentStrumline:FlxSprite = PlayState.instance.opponentStrumline;
        if (PlayState.instance.currentChart.difficulty == "normal") {
            if (opponentStrumline != null) for (arrow in opponentStrumline.members) arrow.visible = false;
            if (playerStrumline != null) playerStrumline.x = FlxG.width / 2 - playerStrumline.width / 2;
        } else {
            if (opponentStrumline != null) for (arrow in opponentStrumline.members) arrow.visible = true;
            if (playerStrumline != null) playerStrumline.x = FlxG.width / 2 + Constants.STRUMLINE_X_OFFSET;
        }
    }

    override public function onSongLoaded(e) {
        super.onSongLoaded(e);
        updateStrumlinePos();
    }

    override public function onSongRetry(e) {
        super.onSongRetry(e);
        updateStrumlinePos();
    }
}
@MAZ12211 MAZ12211 added status: pending triage Awaiting review. type: minor bug Involves a minor bug or issue. labels Feb 3, 2025
@Starexify
Copy link

Starexify commented Feb 3, 2025

Most likely it's because you don't also do the same for state.playerStrumline.noteHoldCovers.members (tho it should be all together imo if you use playerStrumline.x and not be separate for members)

Also would recommend removing the public statements, and export ScriptedSong instead of Song

@MAZ12211
Copy link
Author

MAZ12211 commented Feb 3, 2025

I'll follow your advice as a temporarily fix until I don't have to do this workaround lol
@Starexify Also why are you recommending me to remove public statements and extend ScriptedSong instead of Song?

@Starexify
Copy link

Starexify commented Feb 3, 2025

I'll follow your advice as a temporarily fix until I don't have to do this workaround lol @Starexify Also why are you recommending me to remove public statements and extend ScriptedSong instead of Song?

Because in haxe the public key is not required (it's not java and also it's default on public) and the ScriptedSong is the one that is used by Polymod normally (but somehow the basic ones work) so it's just suggestion mostly

@AbnormalPoof
Copy link
Collaborator

It shouldn’t matter if you use ScriptedSong or Song. They both work the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: pending triage Awaiting review. type: minor bug Involves a minor bug or issue.
Projects
None yet
Development

No branches or pull requests

3 participants