frogatto / frogatto

Frogatto & Friends is an action-adventure game, starring a certain quixotic frog.
http://www.frogatto.com/
Other
621 stars 119 forks source link

Need a way to mute sounds played in a cutscene if we skip the cutscene #384

Open rkettering opened 6 years ago

rkettering commented 6 years ago

Currently, if you skip a conversation, the emotes still make sounds as you fast forward through them, which makes them all play in rapid succession well after the animations attached to them have finished.

Would it be possible to mute emote animation sounds while dialogue is in fast-forward mode?

Like, if you skip Frogatto jumping out of bed at the beginning of the game, you'll hear his head scratch sound even though you never see him scratch his head. I would like to not hear it when the animation gets skipped.

Could even be as simple as tagging sounds specifically as emote sounds, making them a child of the event that plays the sound, and making the sound generator that makes that emote fade out sharply (so there's no pop from its soundwave being interrupted) and then die when the animation it's attached to ends.

Or not even making them a child, and just having a trigger that when an emote animation either ends or is interrupted, anything tagged as an emote sound ends.

rkettering commented 6 years ago

Dave commented on this in #frogatto-dev:

@Jetrel so what should work is (1) put all these sounds in the emote layer by giving them an entry in sound-info.cfg and setting layer: 'emote' in their entry. (2) you can now use lib.sound.set_layer_volume('emote', 0.0) to mute all emote sounds.

We've gone and done this, but we've got a major missing piece we need: We need a event we can respond to, sent by the engine, that triggers when we enter a skip sequence. We can't just put this in our conversation code, because we do not want to mute the sounds in normal playback of a conversation - only when we're skipping it by pressing esc.