If I have an image like this one on my game:
I wanted the person to click on this image and the sound of an offline tv ("oflinnetv.mp3") to start playing.
And when the person clicked the tv again, the sound would stop.
But the problem is: there's already a song playing. And I didn't want it to be stopped.
So, is it possible to create a hotspot where I could play "oflinnetv.mp3" as a sound and when clicking there again, only the tv sound would stop playing? And not the background music.
I had added a "action PauseAudio" and everything stopped playing.The sound, but also the music.
Thanks
[solved] Can I make just one "hotspot" to do it?
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] Can I make just one "hotspot" to do it?
Last edited by Nanahs on Tue Oct 09, 2018 8:20 am, edited 1 time in total.
- parttimestorier
- Veteran
- Posts: 429
- Joined: Thu Feb 09, 2017 10:29 pm
- Completed: No Other Medicine, Well Met By Moonlight, RE:BURN, The Light at the End of the Ocean, Take A Hike!, Wizard School Woes
- Projects: Seeds of Dreams
- itch: janetitor
- Location: Canada
- Contact:
Re: Can I make just one "hotspot" to do it?
If you want to have the TV sound and background music playing at once, and to be able to stop one but not the other, you just need to make sure they're on different channels. The easiest way to do that would be to have the background music on the "music" channel and the TV sound on the "sound" channel, which are the channels that automatically exist already. So you would start them like this:
You need to add "loop" to the "play sound" command if you want the TV sound to keep repeating until you tell it to stop, because by default the music channel loops and the sound channel doesn't. Then when you want the TV sound to stop, just say "stop sound". I'm pretty sure that would work! You could also check this section of the documentation for more information.
Code: Select all
play music "whatever_the_file_name_is.mp3"
play sound "oflinnetv.mp3" loop
Re: Can I make just one "hotspot" to do it?
Thank you so much for your help!parttimestorier wrote: ↑Mon Oct 08, 2018 10:36 pm If you want to have the TV sound and background music playing at once, and to be able to stop one but not the other, you just need to make sure they're on different channels. The easiest way to do that would be to have the background music on the "music" channel and the TV sound on the "sound" channel, which are the channels that automatically exist already. So you would start them like this:
You need to add "loop" to the "play sound" command if you want the TV sound to keep repeating until you tell it to stop, because by default the music channel loops and the sound channel doesn't. Then when you want the TV sound to stop, just say "stop sound". I'm pretty sure that would work! You could also check this section of the documentation for more information.Code: Select all
play music "whatever_the_file_name_is.mp3" play sound "oflinnetv.mp3" loop
Who is online
Users browsing this forum: No registered users