Hello!
I am pretty much using the default renpy options and
I want a sound play after clicking a choice during the visual novel.
I don't want any other UI sound than this. (Don't want sound when you click other buttons like in config menu, title menu textbox shortcuts etc)
Does anyone know how to do this?
P.S. It would be nice if there's also a way to play a sound when you hover over the choice menu as well..
Thank you very much for your time. Your help is appreciated!
[Solved] Playing sound when clicking choice menu
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.
[Solved] Playing sound when clicking choice menu
Last edited by borisoda on Mon Nov 11, 2013 9:14 am, edited 1 time in total.
-
- Lemma-Class Veteran
- Posts: 2299
- Joined: Mon Feb 06, 2012 9:50 pm
- Completed: Icebound, Selenon Rising Ep. 1-2
- Projects: Selenon Rising Ep. 3-4
- Organization: Fastermind Games
- Deviantart: sundownkid
- Location: NYC
- Contact:
Re: Playing sound when clicking choice menu
I know exactly what you're talking about. You want to navigate to screens.rpy and find the "Choice" screen. You want to replace where it says "button:" with this:
Obviously you can switch the "se/select.ogg" to whatever sound you want. The "open" would be pressing the button and "select" would be hovering.
Code: Select all
button:
action [action, Play("sound", "se/open.ogg")]
hovered Play("sound", "se/select.ogg")
style "menu_choice_button"
Re: Playing sound when clicking choice menu
Perfect!
Thank you so much! I'm very happy to be able to use this function!
Thank you so much! I'm very happy to be able to use this function!
- mellowidol
- Newbie
- Posts: 2
- Joined: Mon Apr 23, 2018 8:28 pm
- Tumblr: cafebeat
- Contact:
Re: [Solved] Playing sound when clicking choice menu
I found this very useful. However, I also want to have an effect when I hover over/scroll through choices. I've tried to find it elsewhere, but it seems to be outdated. That or I just can't find where to edit it.
For reference, I found an "outdated" tutorial here: viewtopic.php?t=23938
They gave:
as the solution, but I can't seem to find where "button" is in the screen.rpy file.
Any help would be appreciated, and let me know if I posted incorrectly as this is my first post (and I'm new to this forum.)
For reference, I found an "outdated" tutorial here: viewtopic.php?t=23938
They gave:
Code: Select all
button:
action [action, Play("sound", "se/open.ogg")]
hovered Play("sound", "se/select.ogg")
style "menu_choice_button"
Any help would be appreciated, and let me know if I posted incorrectly as this is my first post (and I'm new to this forum.)
Who is online
Users browsing this forum: Ahrefs [Bot]