Page 1 of 1

[Solved] Choosing "ringtone"? Default music?

Posted: Mon Sep 30, 2019 5:59 pm
by Danah
We can create a default image like this:

Code: Select all

default bgr = '1'
image bgr = 'img[bgr].png'
And then allow the person to change the image creating a button like this:

Code: Select all

    textbutton '{size=30}Background{/size}' action SetVariable('bgr', '2'), Return() pos(30,460)
Is it possible to do the same with music?

I wanted to allow the player to choose their ringtone ("ringtone1.ogg", "ringtone2.ogg", "ringtone3.ogg"). So when I use "play music ringtone" their chosen ringtone will play.

I didn't find any information about it. Is that possible?
Thanks.

Re: Choosing "ringtone"? Default music?

Posted: Mon Sep 30, 2019 8:14 pm
by namastaii
It's the same thing really. you can create a default variable and pop it into the audio file path
https://www.renpy.org/doc/html/audio.ht ... -namespace

Re: Choosing "ringtone"? Default music?

Posted: Wed Oct 02, 2019 10:18 am
by Danah
namastaii wrote: Mon Sep 30, 2019 8:14 pm It's the same thing really. you can create a default variable and pop it into the audio file path
https://www.renpy.org/doc/html/audio.ht ... -namespace
Thank you! I'm going to try it :)

Re: Choosing "ringtone"? Default music?

Posted: Wed Oct 02, 2019 1:12 pm
by namastaii
Actually the new version of renpy released yesterday and you can do it more directly now
https://www.renpy.org/doc/html/changelog.html#audio

Re: Choosing "ringtone"? Default music?

Posted: Fri Oct 04, 2019 8:04 am
by Danah
namastaii wrote: Wed Oct 02, 2019 1:12 pm Actually the new version of renpy released yesterday and you can do it more directly now
https://www.renpy.org/doc/html/changelog.html#audio
I haven't downloaded the new version yet. I'll give it a look. Thanks! :)