Hello !!
I want to have a music keep going in the main menu when the game ends.
As in, the music at the end of my visual novel is the same as the main_menu music.
But, right now when it ends, the music just start over from the beginning, where I would like it to just seemlessly keep playing as the transition happen.
Right now, to display the music on the main_menu, I use this code :
on "show" action Play("music", "gui/pres_de_toi.ogg")
[solved]Make music continue on main menu when the game ends
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.
-
- Regular
- Posts: 26
- Joined: Fri Sep 08, 2017 8:18 am
- Contact:
[solved]Make music continue on main menu when the game ends
Last edited by WillandBran on Fri Nov 20, 2020 10:31 am, edited 1 time in total.
Re: Make music continue on main menu when the game ends
Pass to "Play" class the argument if_changed with the value True.
https://www.renpy.org/doc/html/audio.ht ... music.play
Code: Select all
on "show" action Play("music", "gui/pres_de_toi.ogg", if_changed=True)
-
- Regular
- Posts: 26
- Joined: Fri Sep 08, 2017 8:18 am
- Contact:
Re: Make music continue on main menu when the game ends
Thanks for your response!
Unfortunately, I tried using this code... but it didn't work T.T
Unfortunately, I tried using this code... but it didn't work T.T
Re: Make music continue on main menu when the game ends
Hmm... Have you performed any manipulations with config.main_menu_music variable?
If it is not set, Ren'Py will automatically call renpy.music.stop before initializing the menu.
If all you want is for the music to continue playing, set your song to config.main_menu_music and remove the Play() line at all. Behavior with a preset if_changed for config.main_menu_music is defined by default by the engine.
If it is not set, Ren'Py will automatically call renpy.music.stop before initializing the menu.
If all you want is for the music to continue playing, set your song to config.main_menu_music and remove the Play() line at all. Behavior with a preset if_changed for config.main_menu_music is defined by default by the engine.
-
- Regular
- Posts: 26
- Joined: Fri Sep 08, 2017 8:18 am
- Contact:
Re: Make music continue on main menu when the game ends
Ho !! It's working !!
Thanks a lot !
Thanks a lot !
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot]