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

Enhancement: No Animation Note Type #3966

Open
1 of 2 tasks
Average-FNF-Modder opened this issue Dec 31, 2024 · 4 comments
Open
1 of 2 tasks

Enhancement: No Animation Note Type #3966

Average-FNF-Modder opened this issue Dec 31, 2024 · 4 comments
Labels
status: pending triage The bug or PR has not been reviewed yet. type: enhancement Provides an enhancement or new feature.

Comments

@Average-FNF-Modder
Copy link

Average-FNF-Modder commented Dec 31, 2024

Issue Checklist

  • I have properly named my enhancement
  • I have checked the Issues/Discussions pages to see if my enhancement has already been suggested

What is your suggestion, and why should it be implemented?

I suggest a note which just, doesn't play an animation when you hit it. Useful especially if you want a double to play a certain animation over another but Funkin's natural way of handling animations on a double isn't giving you what you want, or to stop a note from cancelling an animation. I'm sure it has other uses as well.

@Average-FNF-Modder Average-FNF-Modder added status: pending triage The bug or PR has not been reviewed yet. type: enhancement Provides an enhancement or new feature. labels Dec 31, 2024
@MAZ12211
Copy link

MAZ12211 commented Jan 2, 2025

Been trying to make a mod that adds this since 3 days ago lol

@MAZ12211
Copy link

MAZ12211 commented Jan 2, 2025

Current progress by the way (it does nothing)
I'm frankly just scratching my head at this because it does nothing (I made sure I've placed No Anim notes in the chart editor)

import funkin.modding.module.Module;
import funkin.play.PlayState;
import funkin.play.character.CharacterType;

class NoAnimNote extends Module
{
    function new(){
        super("No Anim");
    }
	
	function onNoteHit(e){
		if (e.note.noteData.kind == "No Anim" && e.note.noteData.getMustHitNote()) {
			if (CharacterType.characterType == CharacterType.BF) PlayState.instance.currentStage.getBoyfriend().playAnimation("");
		}
		if (e.note.noteData.kind == "No Anim" && !e.note.noteData.getMustHitNote()) {
			if (CharacterType.characterType == CharacterType.DAD) PlayState.instance.currentStage.getDad().playAnimation("");
		}
	}
}

@Starexify
Copy link

Starexify commented Jan 2, 2025

I have this that adds a custom NoteKind (may be buggy tho, I haven't tested it much, but it works I guess for most uses):

class NoAnimationNote extends ScriptedNoteKind {
    function new() {
        super("no-anim", "No Animation");
    }

    override function onNoteHit(event:HitNoteScriptEvent):Void {
        if (PlayState.instance == null || PlayState.instance.currentStage == null) return;

        var hitter:BaseCharacter;
        if (event.note.noteData.getMustHitNote()) hitter = PlayState.instance.currentStage.getBoyfriend();
        else hitter = PlayState.instance.currentStage.getDad();

        if (hitter != null) {
            var oldIgnoreList = hitter.ignoreExclusionPref;
            hitter.ignoreExclusionPref = [];
            hitter.canPlayOtherAnims = false;

            new FlxTimer().start(0.1, (timer) -> {
                hitter.ignoreExclusionPref = oldIgnoreList;
                hitter.canPlayOtherAnims = true;
            });
        }
    }
}

(so you can find it in here aswell)
Image

@MAZ12211
Copy link

MAZ12211 commented Jan 3, 2025

Oh thank you
I didn't know there was something called note kind in place of note type
Can I use it and have your name at the top of the file or something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: pending triage The bug or PR has not been reviewed yet. type: enhancement Provides an enhancement or new feature.
Projects
None yet
Development

No branches or pull requests

3 participants