Sound Filename Duplication?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
Post Reply
Message
Author
User avatar
Rosstin
Veteran
Posts: 368
Joined: Mon Jan 31, 2011 5:43 pm
Completed: Rex Rocket, Kitty Love, King's Ascent
Projects: Road Redemption, Queen At Arms
Organization: Aqualuft Games
Contact:

Sound Filename Duplication?

#1 Post by Rosstin »

Hey all, Rosstin here!

One thing that has been bugging me. For sounds so far, I currently have to define the filename in multiple places in-script. Like, for this voice example:
http://www.renpy.org/doc/html/voice.html

Code: Select all

play music "mus/ThePyre.ogg" fadeout 0.5 fadein 1.0

voice "line0001.ogg"
"Welcome to Ren'Py..."
I'd really rather not write the filename in-game multiple times, because then if I change it, I have to change it everywhere. :|

For music too. Is there a better way?
Image

User avatar
Alex
Lemma-Class Veteran
Posts: 3090
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Sound Filename Duplication?

#2 Post by Alex »


User avatar
Rosstin
Veteran
Posts: 368
Joined: Mon Jan 31, 2011 5:43 pm
Completed: Rex Rocket, Kitty Love, King's Ascent
Projects: Road Redemption, Queen At Arms
Organization: Aqualuft Games
Contact:

Re: Sound Filename Duplication?

#3 Post by Rosstin »

Thanks! So obvious :o
Image

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Ocelot