Main Menu Music

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
Undead_Duck
Newbie
Posts: 1
Joined: Thu Dec 05, 2013 8:00 am
Contact:

Main Menu Music

#1 Post by Undead_Duck » Thu Dec 05, 2013 8:04 am

I want to add music to my Menu and have done so however when i launch the project nothing plays in the menu. I've looked at a few similar questions but non are specific enough to be helpful. Can someone tell me exactly what to do? please :'(

User avatar
OokamiKasumi
Eileen-Class Veteran
Posts: 1779
Joined: Thu Oct 14, 2010 3:53 am
Completed: 14 games released -- and Counting.
Organization: DarkErotica Games
Deviantart: OokamiKasumi
Location: NC, USA
Contact:

Re: Main Menu Music

#2 Post by OokamiKasumi » Thu Dec 05, 2013 8:36 am

Undead_Duck wrote:I want to add music to my Menu and have done so however when i launch the project nothing plays in the menu. I've looked at a few similar questions but non are specific enough to be helpful. Can someone tell me exactly what to do? please :'(
Is your music in a sub-folder inside the game folder?
-- if So, are you sure you included the name of the folder too?
-- if Not, are you sure you have the Exact name of the piece of music?
-- Are you sure you have quotation marks where they need to be?

If subfolder:

Code: Select all

    config.main_menu_music = "music/zero-project - The mafia.mp3"
If Not subfolder:

Code: Select all

    config.main_menu_music = "zero-project - The mafia.mp3"
Ookami Kasumi ~ Purveyor of fine Smut.
Most recent Games Completed: For ALL my completed games visit: DarkErotica Games

"No amount of great animation will save a bad story." -- John Lasseter of Pixar

User avatar
Donmai
Eileen-Class Veteran
Posts: 1919
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

#3 Post by Donmai » Thu Dec 05, 2013 8:56 am

Adding to what Morgan said: in your options.rpy script you will find these lines:

Code: Select all

## Music that is played while the user is at the main menu.

    # config.main_menu_music = "main_menu_theme.ogg"
You must uncomment the command line, removing the '#' character at the start:

Code: Select all

## Music that is played while the user is at the main menu.

    config.main_menu_music = "my_music_theme.ogg"
Start your game now and the music should play (check on the preferences screen that the music volume isn't set to zero).
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

kamti
Newbie
Posts: 7
Joined: Sun Apr 12, 2015 1:50 am
Contact:

Re: Main Menu Music

#4 Post by kamti » Sun Apr 12, 2015 1:53 am

Hello, guys! I set a sound for a main menu, as a guy above. So, sound works well, but when I start game, it still plays. How to make it stop after I start a game?

User avatar
Donmai
Eileen-Class Veteran
Posts: 1919
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

#5 Post by Donmai » Sun Apr 12, 2015 9:36 am

Simply stopping it.

Code: Select all

label start:
    stop music fadeout 1.0
http://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)

Post Reply

Who is online

Users browsing this forum: span4ev