Hi guys!
I'm more of a writer so I'm a complete noob at coding. I'm trying to add sound effect to all clicking in the game, but the replacing in the options script only allows the non-customized buttons have a sound. Therefore, my quick menu by textbox & yesno prompts do not have a sound. Any way to fix this?? :3 thanks!
Sound effect for custom buttons [SOLVED]
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.
- Snowflower
- Bishie Fangirl
- Posts: 814
- Joined: Sat Jan 01, 2011 11:24 pm
- Completed: Idol Crush
- Projects: Shugojin!, RockRobin (openmodewriter), your highness
- Soundcloud: jenna-yeon
- Location: Orange County, CA
- Contact:
Sound effect for custom buttons [SOLVED]
Last edited by Snowflower on Thu Aug 07, 2014 6:40 am, edited 1 time in total.
Completed: Idol Crush | WIP: your highness | Hiatus: Shugojin!| Follow Me on Twitter | Subscribe to YouTube
your highness @ 102k as of 2/13
Re: Sound effect for custom buttons
Have you tried to put this in options.rpy
Code: Select all
style.button.activate_sound = "sound/beep3.wav"
style.imagemap.activate_sound = "sound/beep4.wav"
config.enter_sound = "sound/switch2.wav"
config.exit_sound = "sound/lp10.mp3"
- Snowflower
- Bishie Fangirl
- Posts: 814
- Joined: Sat Jan 01, 2011 11:24 pm
- Completed: Idol Crush
- Projects: Shugojin!, RockRobin (openmodewriter), your highness
- Soundcloud: jenna-yeon
- Location: Orange County, CA
- Contact:
Re: Sound effect for custom buttons
stwkun wrote:Have you tried to put this in options.rpy
Code: Select all
style.button.activate_sound = "sound/beep3.wav" style.imagemap.activate_sound = "sound/beep4.wav" config.enter_sound = "sound/switch2.wav" config.exit_sound = "sound/lp10.mp3"
yup that's exactly what i have currently.
But my customized hotspots aren't clicking with sounds. all the renpy default buttons do though
Completed: Idol Crush | WIP: your highness | Hiatus: Shugojin!| Follow Me on Twitter | Subscribe to YouTube
your highness @ 102k as of 2/13
- Donmai
- Eileen-Class Veteran
- Posts: 1960
- Joined: Sun Jun 10, 2012 1:45 am
- Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
- Projects: Slumberland
- Location: Brazil
- Contact:
Re: Sound effect for custom buttons
Are you using image maps? This code should do the trick. Change the name of the files as needed.
Just adapt it for each button. The sound will play when the button is hovered.
Code: Select all
hotspot (1150, 443, 105, 32) action Start() hovered Play ("sound", "click_sound.ogg")
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)
TOIRE NO HANAKO (A Story About Fear)
Re: Sound effect for custom buttons
style.hotspot.hover_sound will also work. If you want to customise sounds for individual items, the above would be want you want, if you want to change a sound for a certain style, you just need to put hover_sound and activate_sound in the block for those styles.
- Snowflower
- Bishie Fangirl
- Posts: 814
- Joined: Sat Jan 01, 2011 11:24 pm
- Completed: Idol Crush
- Projects: Shugojin!, RockRobin (openmodewriter), your highness
- Soundcloud: jenna-yeon
- Location: Orange County, CA
- Contact:
Re: Sound effect for custom buttons
you are a genius! :3 thanks a bunch!!Tayruu wrote:style.hotspot.hover_sound will also work. If you want to customise sounds for individual items, the above would be want you want, if you want to change a sound for a certain style, you just need to put hover_sound and activate_sound in the block for those styles.
Completed: Idol Crush | WIP: your highness | Hiatus: Shugojin!| Follow Me on Twitter | Subscribe to YouTube
your highness @ 102k as of 2/13
Who is online
Users browsing this forum: Dark12ose, Sugar_and_rice