How to make the main menu music stop playing?

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
User avatar
pleasethinkofme
Regular
Posts: 140
Joined: Mon Aug 22, 2011 12:21 pm
Location: USA
Contact:

How to make the main menu music stop playing?

#1 Post by pleasethinkofme » Sat Oct 08, 2011 4:49 pm

Every time I go to play the game, the main menu music continues to play over the other music -.- what do I do?

User avatar
DragoonHP
Miko-Class Veteran
Posts: 758
Joined: Tue Jun 22, 2010 12:54 am
Completed: Christmas
IRC Nick: DragoonHP
Location: Zion Island, Solario
Contact:

Re: How to make the main menu music stop playing?

#2 Post by DragoonHP » Sat Oct 08, 2011 4:52 pm

I don't understand what your meant, but maybe... use the stop command...?

EDIT: It would be helpful if you could tell when do you want the main menu music to stop playing...

User avatar
pleasethinkofme
Regular
Posts: 140
Joined: Mon Aug 22, 2011 12:21 pm
Location: USA
Contact:

Re: How to make the main menu music stop playing?

#3 Post by pleasethinkofme » Sat Oct 08, 2011 4:53 pm

DragoonHP wrote:I don't understand what your meant, but maybe... use the stop command...?
I've tried but that doesn't seem to work either >.< I mean I have one song playing when on the main menu, and then when you start to play the game the main menu music keeps playing over the game's music..you know? D':

User avatar
DragoonHP
Miko-Class Veteran
Posts: 758
Joined: Tue Jun 22, 2010 12:54 am
Completed: Christmas
IRC Nick: DragoonHP
Location: Zion Island, Solario
Contact:

Re: How to make the main menu music stop playing?

#4 Post by DragoonHP » Sat Oct 08, 2011 4:57 pm

Oh... so if I'm not wrong, the music which should have stopped automatically as you would have entered the menu keeps playing...

Have you customised the Main Menu?
If yes, the main menu code will be useful to decipher the problem...

If you haven't customised the main menu... erm... it will require a bit of brainstorming...

User avatar
DragoonHP
Miko-Class Veteran
Posts: 758
Joined: Tue Jun 22, 2010 12:54 am
Completed: Christmas
IRC Nick: DragoonHP
Location: Zion Island, Solario
Contact:

Re: How to make the main menu music stop playing?

#5 Post by DragoonHP » Sat Oct 08, 2011 5:07 pm

Code: Select all

label main_menu:
    
    play music "Music/Frost Waltz.mp3"
    
    scene mainmenu
    show snow
    
    $ ui.vbox(xpos=0.4, ypos=0.35)
    $ ui.imagebutton("Main_Menu_Stuff/S1.png", "Main_Menu_Stuff/S2.png", clicked=ui.returns("start"))
    $ ui.imagebutton("Main_Menu_Stuff/L1.png", "Main_Menu_Stuff/L2.png", clicked=ui.returns("load"))
    $ ui.imagebutton("Main_Menu_Stuff/O1.png", "Main_Menu_Stuff/O2.png", clicked=ui.returns("prefs"))
    $ ui.imagebutton( "Main_Menu_Stuff/E1.png", "Main_Menu_Stuff/E2.png", clicked=ui.returns("quit"))
    $ ui.close()
    
    $ result = ui.interact()
    
    if result == "start":
        hide mainmenu
        $ renpy.jump_out_of_context("start")
    
    elif result == "load":
        jump load_screen
        
    elif result == "prefs":
        jump preferences_screen
            
    elif result == "quit":
        $ renpy.quit()
        
    stop music
        
    return
Here's the main menu code from one of my game...
Hope it will be able to help...

User avatar
pleasethinkofme
Regular
Posts: 140
Joined: Mon Aug 22, 2011 12:21 pm
Location: USA
Contact:

Re: How to make the main menu music stop playing?

#6 Post by pleasethinkofme » Sat Oct 08, 2011 5:15 pm

now my main menu disappeared O.o Maybe the main menu just won't have music then...haha

HigurashiKira
Miko-Class Veteran
Posts: 832
Joined: Mon Nov 01, 2010 9:10 pm
Contact:

Re: How to make the main menu music stop playing?

#7 Post by HigurashiKira » Sat Oct 08, 2011 5:39 pm

Simplly do this:

Code: Select all

label start:

    stop music

    #The game continues here
I have moved to a new account. Please contact me here from now on. T/Y~

User avatar
pleasethinkofme
Regular
Posts: 140
Joined: Mon Aug 22, 2011 12:21 pm
Location: USA
Contact:

Re: How to make the main menu music stop playing?

#8 Post by pleasethinkofme » Sat Oct 08, 2011 5:53 pm

HigurashiKira wrote:Simplly do this:

Code: Select all

label start:

    stop music

    #The game continues here
Thank you T.T I am so ignorant...haha, but really thank you so much!! :D

kistnerelizabeth
Regular
Posts: 74
Joined: Wed Feb 10, 2016 1:20 am

Re: How to make the main menu music stop playing?

#9 Post by kistnerelizabeth » Sun Jun 04, 2017 2:16 am

Thank you for making this! I was literally just dealing with this issue, too. I feel like a doofus. >.<

Post Reply

Who is online

Users browsing this forum: Bing [Bot]