Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
-
yoyuchi
- Regular
- Posts: 58
- Joined: Sat Jul 09, 2022 1:39 pm
-
Contact:
#1
Post
by yoyuchi » Sat Oct 08, 2022 3:18 am
Good day.
While the long SE sound is playing in the game, if return to the main menu using the quick menu, sound remains and is playing on the main menu.
How do I turn off the SE sound when I return to the main menu through the quick menu?
Code: Select all
imagebutton:
idle "grp/parts/Mquit_idle.png"
hover "grp/parts/Mquit_hover.png"
activate_sound "sound/se/se_02.ogg" hover_sound "sound/se/se_01.ogg"
action [$ renpy.sound.stop(channel=0), Preference("auto-forward", "disable"), MainMenu()]
I tried to put the command like this, but an error occurred.
What command should I put in the "action"?
I need your help.
Thank you in advance.
-
plastiekk
- Regular
- Posts: 40
- Joined: Wed Sep 29, 2021 4:08 am
- Discord: plastiekk#3072
-
Contact:
#2
Post
by plastiekk » Thu Oct 20, 2022 10:22 am
yoyuchi wrote: ↑Sat Oct 08, 2022 3:18 am
Code: Select all
imagebutton:
idle "grp/parts/Mquit_idle.png"
hover "grp/parts/Mquit_hover.png"
activate_sound "sound/se/se_02.ogg" hover_sound "sound/se/se_01.ogg"
action [$ renpy.sound.stop(channel=0), Preference("auto-forward", "disable"), MainMenu()]
Your action should look like this:
Code: Select all
action [Function(renpy.sound.stop), Preference("auto-forward", "disable"), MainMenu()]
Notice there is a difference between
renpy.sound.stop and
renpy.music.stop
Why on earth did I put the bread in the fridge?
Users browsing this forum: No registered users