How can I make a button to return to the main menu

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
Karrion
Regular
Posts: 68
Joined: Fri Jan 18, 2019 8:33 pm
Projects: Murder on the Marine Express
Organization: 1564 Studio
itch: 1564-studio
Contact:

How can I make a button to return to the main menu

#1 Post by Karrion » Fri Jul 03, 2020 1:22 pm

My game currently has 2 "main menus", one ingame, that you access through a button, in the main novel screen, and another one that is the one shown at the beginning of the game. I want to make a button inside the first menu (the ingame one), to return to the second main menu (the one at the start), but I don't know how to do that. I've tried various Calls and ShowMenus but none seem to work. Call "start", "main_menu" and "renpy.full_restart" result in a crash that says that can't find those labels. Any ideas?

Also, using Return() closes the ingame menu and returns me to the normal novel screen.

Thanks in advance.

Edit: Apparently I can't read and there is a function called MainMenu() that I didn't see in the documentation *facepalm*
1564 Studio, an indie studio dedicated to developing mystery VNs!
Follow us on Twitter for updates on our projects!

Image

Check out our current project, just released on PC and Android!

Image

User avatar
namastaii
Eileen-Class Veteran
Posts: 1350
Joined: Mon Feb 02, 2015 8:35 pm
Projects: Template Maker for Ren'Py, What Life
Github: lunalucid
Skype: Discord: lunalucid#1991
Soundcloud: LunaLucidMusic
itch: lunalucid
Location: USA
Contact:

Re: How can I make a button to return to the main menu

#2 Post by namastaii » Sat Jul 04, 2020 10:45 pm

Ah yeah, might want to prompt player to save before returning to menu too

User avatar
Karrion
Regular
Posts: 68
Joined: Fri Jan 18, 2019 8:33 pm
Projects: Murder on the Marine Express
Organization: 1564 Studio
itch: 1564-studio
Contact:

Re: How can I make a button to return to the main menu

#3 Post by Karrion » Mon Jul 06, 2020 9:44 am

The MainMenu() function also covers that, thankfully.
1564 Studio, an indie studio dedicated to developing mystery VNs!
Follow us on Twitter for updates on our projects!

Image

Check out our current project, just released on PC and Android!

Image

User avatar
namastaii
Eileen-Class Veteran
Posts: 1350
Joined: Mon Feb 02, 2015 8:35 pm
Projects: Template Maker for Ren'Py, What Life
Github: lunalucid
Skype: Discord: lunalucid#1991
Soundcloud: LunaLucidMusic
itch: lunalucid
Location: USA
Contact:

Re: How can I make a button to return to the main menu

#4 Post by namastaii » Tue Jul 07, 2020 4:50 pm

Oh, good to know. Wasn't sure.

Post Reply

Who is online

Users browsing this forum: Google [Bot]