Skip to content

How would I make the opponent play an animation when the player character misses a note? #3864

Answered by AbnormalPoof
sphis-Sinco asked this question in Q&A
Discussion options

You must be logged in to vote

Funkin' has a lot of built-in callbacks for various things. This example uses onNoteMiss, which is called when you... well...

function onNoteMiss(event:NoteScriptEvent)
{
	super.onNoteMiss(event);
	// Your custom functionality here
	// i.e: PlayState.instance.currentStage.getDad().playAnimation('animation-name');
	// If you want it to be forced: PlayState.instance.currentStage.getDad().playAnimation('animation-name', true, true);
}

NOTE: This will not run if you "miss" a note by mashing, there is a different callback for that (onNoteGhostMiss)

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@sphis-Sinco
Comment options

@EliteMasterEric
Comment options

@sphis-Sinco
Comment options

@KoloInDaCrib
Comment options

@sphis-Sinco
Comment options

Answer selected by EliteMasterEric
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants