Is there a way to set up the game so that sound effects (played through the sound channel) will be disabled if the player is currently skipping through text? I've realized it might be annoying to the end user to have SFX from lines and lines of text ago playing from a moment they skipped through a second ago (but that the normal user who was not skipping would've heard a minute or a few ago).
Preferably a way to do it without changing every "play sound ..." line. Thanks
Way to, globally throughout the game, mute channel if skipping?
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
- SuperbowserX
- Veteran
- Posts: 270
- Joined: Sat Jan 07, 2017 3:09 pm
- Contact:
Re: Way to, globally throughout the game, mute channel if skipping?
Hmm. Hypothetically, you could have an on "show"/"hide" action to mute the sfx mixer on the skip screen. Haven't tested it though.
- PyTom
- Ren'Py Creator
- Posts: 16093
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: Way to, globally throughout the game, mute channel if skipping?
You can add a function to config.interact_callbacks that checks to see if config.skipping is true-ish and mutes the channel.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
- SuperbowserX
- Veteran
- Posts: 270
- Joined: Sat Jan 07, 2017 3:09 pm
- Contact:
Re: Way to, globally throughout the game, mute channel if skipping?
@philat - I found screen skip_indicator(): but I don't know what screen-compatible value can be passed into it that mutues the sound channel.
@pytom - I did a ctrl+shift+f (searches all files in the \game directory) for "config.interact_callbacks" and nothing was found.
@pytom - I did a ctrl+shift+f (searches all files in the \game directory) for "config.interact_callbacks" and nothing was found.
Re: Way to, globally throughout the game, mute channel if skipping?
As for interact_callbacks, I'll defer to PyTom of course, but I think the issue there is that it's only optional -- you wouldn't find anything defined by default. https://www.renpy.org/doc/html/config.h ... _callbacks
As for the screen, I imagine it would be something along the lines of:
See here for more audio related screen actions that you could look into. I haven't tested this.
ETA: Er, meant to copy/paste a link here (obviously) and forgot (facepalm). Glad you worked it out, adding for posterity. https://www.renpy.org/doc/html/screen_a ... io-actions
As for the screen, I imagine it would be something along the lines of:
Code: Select all
screen skip_indicator():
on "show" SetMute("sfx", True)
on "hide" SetMute("sfx", False)
# the rest of the screen unaltered
ETA: Er, meant to copy/paste a link here (obviously) and forgot (facepalm). Glad you worked it out, adding for posterity. https://www.renpy.org/doc/html/screen_a ... io-actions
Last edited by philat on Tue Sep 05, 2017 1:03 am, edited 2 times in total.
- SuperbowserX
- Veteran
- Posts: 270
- Joined: Sat Jan 07, 2017 3:09 pm
- Contact:
Re: Way to, globally throughout the game, mute channel if skipping?
Code: Select all
on "show" action SetMute("sfx", True)
on "hide" action SetMute("sfx", False)
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot]