Main Menu Music / auto-off?

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
HoAbGa
Newbie
Posts: 12
Joined: Mon Oct 30, 2017 4:38 am
Contact:

Main Menu Music / auto-off?

#1 Post by HoAbGa »

Hi all,

Can anyone tell me where I have to write a play music funktion, to play a music in loop in the mainmenu?
And in addition, how can I turn off the music, when I leave the mainmenu (start or load a game). I dont want to make a stop funktion in every single label.

Thanks for help :)

User avatar
Donmai
Eileen-Class Veteran
Posts: 1960
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: Main Menu Music / auto-off?

#2 Post by Donmai »

HoAbGa wrote: Tue Dec 12, 2017 11:10 am where I have to write a play music funktion, to play a music in loop in the mainmenu?
As far as I know you don't need to. Just go to the ## Sounds and music ## section of options.rpy and find the line that reads

Code: Select all

# define config.main_menu_music = "main-menu-theme.ogg"
Remove the comment mark and put the name of your song there

Code: Select all

define config.main_menu_music = "the name of your song here.ogg"
HoAbGa wrote: Tue Dec 12, 2017 11:10 am And in addition, how can I turn off the music, when I leave the mainmenu (start or load a game).
you can do

Code: Select all

label start:

    stop music
or

Code: Select all

label start:

    stop music fadeout 1.0
https://www.renpy.org/doc/html/audio.html#audio
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

HoAbGa
Newbie
Posts: 12
Joined: Mon Oct 30, 2017 4:38 am
Contact:

Re: Main Menu Music / auto-off?

#3 Post by HoAbGa »

Hi, thank you :)

But I dont want to use this "stop music" funktion in the first label. If I work with savegames, I habe to use it in every single label to stop the music!? That is not good, because I have to much labels.
Is there a easy way to stop the music in the gamemenue if I leave the menue?

User avatar
Donmai
Eileen-Class Veteran
Posts: 1960
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: Main Menu Music / auto-off?

#4 Post by Donmai »

HoAbGa wrote: Wed Dec 13, 2017 12:39 am If I work with savegames, I habe to use it in every single label to stop the music!?
No.
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

HoAbGa
Newbie
Posts: 12
Joined: Mon Oct 30, 2017 4:38 am
Contact:

Re: Main Menu Music / auto-off?

#5 Post by HoAbGa »

Donmai wrote: Wed Dec 13, 2017 8:45 am
HoAbGa wrote: Wed Dec 13, 2017 12:39 am If I work with savegames, I habe to use it in every single label to stop the music!?
No.
Thank you :) It works pretty fine :)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]