Extras: Returning to 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
Coren
Mindscrew Driver
Posts: 1691
Joined: Fri Sep 18, 2009 9:24 am
Completed: Dear Mariko, Six Rules, Ribbon of Green, RE: Prince of Nigeria, Doppelganger, Cole's Gate Demo, Crimson Rafflesia Demo, Mica: Apoptosis Demo
Projects: Crimson Rafflesia, Mica: Apoptosis, Fantasy Euthanasia
Organization: Soyasushi Productions
Tumblr: CorenBaili
Deviantart: CorenB
Skype: coren.baili
Contact:

Extras: Returning to main menu

#1 Post by Coren » Wed Aug 29, 2012 5:52 am

How do I make it such that clicking on the "return" button from a self-inserted Extras/Bonus section will lead back to the main menu without any problems? "jump main_menu_screen" keeps getting a traceback error, and the one with the full restart ends up having another traceback.

User avatar
Ryouzanki
Regular
Posts: 31
Joined: Mon May 21, 2012 2:18 am
Projects: Sous le masque / Social shark
Organization: Bal masqué
Location: France
Contact:

Re: Extras: Returning to main menu

#2 Post by Ryouzanki » Wed Aug 29, 2012 9:42 am

Hello !

Did you try $ renpy.full_restart() ?

LittleUrchin
Regular
Posts: 43
Joined: Sat Aug 11, 2012 4:53 pm
Location: Trapped inside a snow cone with a purple walrus and a broken jukebox
Contact:

Re: Extras: Returning to main menu

#3 Post by LittleUrchin » Wed Aug 29, 2012 9:45 am

The jump statement is used to go to the given label, so you probably want to show the main menu screen instead. Like:

Code: Select all

imagebutton:
    idle "whatever.png"
    hover "whatever.png"
    action MainMenu()
Hope that helps.[/color]

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: Extras: Returning to main menu

#4 Post by OokamiKasumi » Wed Aug 29, 2012 11:19 am

Kirroha wrote:How do I make it such that clicking on the "return" button from a self-inserted Extras/Bonus section will lead back to the main menu without any problems?
I just used "use navigation" to do it for me.

This is my bonus screen template:

Code: Select all

## --------- Bonus Menu ------------
screen bonus_menu:
    tag menu
    add "ui/Nav_bg.png" #The background image.
    use navigation  
   
    imagemap:
        ground "ui/bonus_ground.png"
        idle "ui/bonus_idle.png"
        hover "ui/bonus_hover.png"
       
        alpha False
      
        hotspot (61, 47, 289, 75) action ShowMenu("gallery_1") activate_sound "sfx/click.wav"
        hotspot (119, 123, 176, 62) action ShowMenu("music_room") activate_sound "sfx/click.wav"
        hotspot (31, 189, 348, 57) action ShowMenu("about") activate_sound "sfx/click.wav"
        hotspot (130, 265, 154, 52) action ShowMenu("credits") activate_sound "sfx/click.wav"

 
init -2 python:
    style.gm_nav_button.size_group = "gm_nav"
It looks like this:
Untitled-1.jpg
The words across the bottom are my Navigation screen. The bonus screen is accessed from the main menu on the front page.
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
Hijiri
Eileen-Class Veteran
Posts: 1519
Joined: Sun Mar 25, 2012 6:35 pm
Completed: Death Rule:lost code Overdrive Edition, Where the White Doves Rest-Tsumihanseishi
Projects: Death Rule: Killing System
Organization: MESI Games
IRC Nick: Hizi
Tumblr: mesigames
Skype: kurotezuka
itch: hijiri
Location: Los Angeles
Contact:

Re: Extras: Returning to main menu

#5 Post by Hijiri » Wed Aug 29, 2012 2:33 pm

Kirroha wrote:How do I make it such that clicking on the "return" button from a self-inserted Extras/Bonus section will lead back to the main menu without any problems? "jump main_menu_screen" keeps getting a traceback error, and the one with the full restart ends up having another traceback.
If you're using screens, you can either use

Code: Select all

Return()
or

Code: Select all

action ShowMenu('main_menu')
Image Image
"Perfection goal that always changes. Can pursue, cannot obtain."

Post Reply

Who is online

Users browsing this forum: Google [Bot], Ocelot