Background music question

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
Aleks
Newbie
Posts: 2
Joined: Fri Feb 01, 2008 5:18 pm
Contact:

Background music question

#1 Post by Aleks »

Code: Select all

    # Music to play at the main menu.
    config.main_menu_music = "mymainmenumusic.ogg"
Yeah, I want to use a specific musical piece I made, and I've done all the preperations with it, it's .ogg and everything. Now the problem is. I put it in like that, and yeah -- sure, I the piece plays when I'm inside the Main Menu, but how do I make it automatically stop as soon as one clicks the "New Game" button? Because the piece continues playing even when I start the game.

Calimon
Newbie
Posts: 3
Joined: Fri Mar 30, 2007 12:23 pm
Location: Under everybody's couch. :3
Contact:

Re: Background music question

#2 Post by Calimon »

Code: Select all

$ renpy.music.stop
Ye can put this in the main script where the game first starts.
^_^

And if that doesn't work.

Code: Select all

$ renpy.music.stop(fadeout = 0.5)
This can work too. ^_^
(Though I'm sure that the first one should work anyway.
Or something. @_@)

Aleks
Newbie
Posts: 2
Joined: Fri Feb 01, 2008 5:18 pm
Contact:

Re: Background music question

#3 Post by Aleks »

It worked!

Thanks!

Post Reply

Who is online

Users browsing this forum: No registered users