Hi to all =)
I would just like to ask if there's a way to play BGM and SFX as objects .. like "bgm01.play()", instead of directly calling the renpy.music_start() static method =)?
BGM and SFX
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.
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Actually, renpy.music_start is deprecated in favor of renpy.music.play.
But no, there's not. Why do you want to do this? If it's to abstract out the sound filenames, the way to do that is to use variables:
Of course, if you really insist on using an object, it would be fairly easy to define one.
(The acceleration blew out on my video card, making me an unhappy camper. At least I can RMA it.)
But no, there's not. Why do you want to do this? If it's to abstract out the sound filenames, the way to do that is to use variables:
Code: Select all
init:
$ snd_scream = "scream.wav"
$ renpy.sound.play(snd_scream)
(The acceleration blew out on my video card, making me an unhappy camper. At least I can RMA it.)
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
nice idea there ^-^ I'll just do it with variables then ^^
Btw, thanks Tom ur the best
I try not to "hard code" the filename parameter of the audio elements as much as possible; so when I decide to change it in the middle of development I could easily modify it on one single line ^^Why do you want to do this?
Btw, thanks Tom ur the best
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
This is the right attitude to have, by the way... good for you for having it.yuirei wrote:I try not to "hard code" the filename parameter of the audio elements as much as possible; so when I decide to change it in the middle of development I could easily modify it on one single line
(BTW, did you draw your avatar? I can't tell if that's Shana or not.)
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
Who is online
Users browsing this forum: No registered users