Is there any way to have music specifically for menus?

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
Tage
Regular
Posts: 194
Joined: Mon Nov 01, 2004 2:18 am
Location: Memphis, TN
Contact:

Is there any way to have music specifically for menus?

#1 Post by Tage »

I was wondering if you could have certain music play when the user right clicks/escapes to go to the menu in the middle of play. Or perhaps even pause the music while you're in the options? If it is not possible, that's fine. It isn't too important to me.
Last edited by Tage on Sat Dec 11, 2004 1:12 am, edited 1 time in total.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#2 Post by PyTom »

No, this isn't possible.

Peewee

#3 Post by Peewee »

Is this a feature you might include in a future version? It would be GREAT to double-click on the .exe, and then have music immediately start in the menu screen to set the mood.

Thanks for all your great work.

Megaman Z
Miko-Class Veteran
Posts: 829
Joined: Sun Feb 20, 2005 8:45 pm
Projects: NaNoRenO 2016, Ren'Py tutorial series
Location: USA
Contact:

#4 Post by Megaman Z »

I'd have to agree with Peewee. seperate music for the option menu(s) is starting to become common in more recent games. (then again, this is purely aesthetic...)
~Kitsune Zeta

User avatar
rioka
Royal Manga Tutor
Posts: 1255
Joined: Fri Jul 16, 2004 12:21 pm
Completed: Amgine Park, Garden Society: Kykuit, Metropolitan Blues (art)
Location: somewhere in NY
Contact:

#5 Post by rioka »

There is a slight way you can get around this. In my recent game, GSK, music starts up automatically when the splash screen is called and then goes to the menu screen. Of course, since I have the coding to start the music in the splash screen, if the player should play the game, and go back to the main menu, the beginning music will not start.

I considered messing around with the files in the common folder but I had the NaNoRenO deadline to consider so I opted for the passable solution above. It's not perfect but it's better than nothing, ne?

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#6 Post by PyTom »

You can also define your own main menu, that simply jumps off to _library_main_menu. Something like:

Code: Select all

label main_menu:

$ renpy.music_start('menu.ogg')

jump _library_main_menu
The normal startup sequence is that _start is jumped to. If it exists, splashscreen is called the first time through. Then control falls through to _main_menu, which jumps to main_menu if that exists, or falls through to _library_main_menu if it doesn't. main_menu can jump to _library_main menu if it wants, or else start the game by jumping to another label. By default, _library_main_menu gives a number of options including a jump to start, which is the nominal start of the game.

I remember back when the interpreter just jumped directly to start, way back in the 4.0 days. (Or was it pre4?)

I'm actually considering dispensing with the main menu entirely in my next game, and instead displaying an instruction telling people to right click to get to the game menu.

What one can't do right now is to have separate music for the game menu. This is one feature I keep forgetting to add.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Peewee

#7 Post by Peewee »

Oh, wow. That totally worked. Thank you guys so much. The main screen popped up with triumphant music, and I shed a small, crystalline tear. :)

Post Reply

Who is online

Users browsing this forum: Google [Bot], Wildmask