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.
This works, but when the game starts and the main menu is shown, this exact music begins playing. When I show the screen the music simply restarts. I read in the documentation that python code inside screens causes side effects and unexpected behavior, this is probably what they meant, so how can I achieve what I want (having the screen automatically play a music file) without calling it from inside the screen? Do I need to write a function that plays the music and then calls the screen?
Last edited by DannyGMaster on Wed Jun 21, 2017 9:07 am, edited 1 time in total.
The silent voice within one's heart whispers the most profound wisdom.
screen test:
on "show" action Play("audio", 'audio/Test_01.ogg', loop=True)
#on "hide" action Stop("audio") if music must stop on hide screen
add "bg_01"
add "c_02"
If you use music in main menu, change music channel for main menu music and add action Mute for "sounds" and "music" channels.