How would I make the opponent play an animation when the player character misses a note? #3864
-
In an update to a Mod I am working on I would like to make my opponent character laugh at Boyfriend but I don't know much on the scripting side of VSlice and mostly copied from the Base Game's Scripts in a previous mod. Does anyone have a way of making the opponent character play an animation when the player misses a note? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
Funkin' has a lot of built-in callbacks for various things. This example uses 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 ( |
Beta Was this translation helpful? Give feedback.
Funkin' has a lot of built-in callbacks for various things. This example uses
onNoteMiss
, which is called when you... well...NOTE: This will not run if you "miss" a note by mashing, there is a different callback for that (
onNoteGhostMiss
)