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 » Tue Oct 04, 2022 1:03 pm
Good day.
Activate and hover sound were added to the image button in the preference menu. And how can I put activate and hover sound into "bar menu" such as volume control and transparency control?
activate_sound "sound/se/se_02.ogg" hover_sound "sound/se/se_01.ogg"
I tried to place it here and there, but it was impossible.
Here's my script. What should I do?
Code: Select all
vbox:
style_group "prefs"
vbox:
bar value Preference("music volume") #at bar_transform
activate_sound "sound/se/se_02.ogg"
hover_sound "sound/se/se_01.ogg"
pos(10, 119)
vbox:
bar value Preference("voice volume")
pos(10, 176)
Thank you in advance.
-
laure44
- Regular
- Posts: 60
- Joined: Mon Mar 08, 2021 10:55 pm
- Projects: Arkan'sTower, Gemshine Lorelei!
- Location: France
-
Contact:
#2
Post
by laure44 » Tue Oct 04, 2022 2:06 pm
You can't use activate_sound and hover_sound for bars (or for vbox like in your exemple), however you can do something like this:
Code: Select all
bar:
value Preference("music volume") #at bar_transform
released Play("sound", "sound/se/se_02.ogg")
hovered Play("sound", "sound/se/se_01.ogg")
-
yoyuchi
- Regular
- Posts: 58
- Joined: Sat Jul 09, 2022 1:39 pm
-
Contact:
#3
Post
by yoyuchi » Wed Oct 05, 2022 1:37 am
laure44 wrote: ↑Tue Oct 04, 2022 2:06 pm
You can't use activate_sound and hover_sound for bars (or for vbox like in your exemple), however you can do something like this:
Code: Select all
bar:
value Preference("music volume") #at bar_transform
released Play("sound", "sound/se/se_02.ogg")
hovered Play("sound", "sound/se/se_01.ogg")
Your script works fine!
The bar is making se sound.
You're amazing!!!

Users browsing this forum: Google [Bot], Majestic-12 [Bot]