Returning to "Extras" menu instead of 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
AERenoir
Veteran
Posts: 320
Joined: Fri May 27, 2011 8:23 pm
Contact:

Returning to "Extras" menu instead of main menu

#1 Post by AERenoir »

In the extras section of my game, I have a "bonus scene" option. Since I'm using Start("label") for the bonus scene, if I put Return at the end, it sends me back to the main menu. I want to return to the Extras menu screen instead of main menu after the bonus scene ends. What do I do?

philat
Eileen-Class Veteran
Posts: 1912
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: Returning to "Extras" menu instead of main menu

#2 Post by philat »


User avatar
Alera
Miko-Class Veteran
Posts: 651
Joined: Sun Mar 21, 2010 3:20 am
Completed: Tortichki // Zayay // Hero's Spirit
Deviantart: psyalera
itch: psyalera
Location: UK
Contact:

Re: Returning to "Extras" menu instead of main menu

#3 Post by Alera »

Maybe have a label for your extras menu and instead of using 'Return', use 'jump' at the end of your scene to go back to that label and the menu? But what @philat suggested sounds like a 'cleaner' way of doing it.
Image
Games:
❤️ Zayay [Otome?][BxPlayer][NaNo 2013]
❤️ Tortichki [Drag&Drop mini game]

Other games I've worked on:
My Heart's Flame Emissary of Starlight Freedom From Silence Sickness
And many more unannounced/secret projects. (. .)

User avatar
KairuKyun
Veteran
Posts: 286
Joined: Thu Feb 12, 2015 4:10 pm
Completed: No One But You, Catch Canvas, Sickness, Written in the Sky, Wander no more, Warped Reality
Projects: Warped Reality
Organization: Unwonted Studios
IRC Nick: Kairu_kyun
Tumblr: karamuchan
Contact:

Re: Returning to "Extras" menu instead of main menu

#4 Post by KairuKyun »

Couldn't you just

Code: Select all

ShowMenu("extras")
Thats what i did
Kyle Tyner
Creator of Unwonted Studios
ktyner@unwontedstudios.co
Visit Our Website
Projects: No One But You, Sickness, Written in the Sky, Wander no more, Catch Canvas, Warped Reality

User avatar
AERenoir
Veteran
Posts: 320
Joined: Fri May 27, 2011 8:23 pm
Contact:

Re: Returning to "Extras" menu instead of main menu

#5 Post by AERenoir »

Doesn't that require the scene to have been played first to activate the "replay" option? What I meant is that I have this completely new scene that you will not encounter in-game and only will be accessible from the Extras menu.
Alera wrote:Maybe have a label for your extras menu and instead of using 'Return', use 'jump' at the end of your scene to go back to that label and the menu? But what @philat suggested sounds like a 'cleaner' way of doing it.
Yeah, I saw this method on the old cookbook in the Wiki, but it seemed rather roundabout and I wanted to know if there's a simpler way to do it rather than have multiple empty labels with nothing but "call screen" in it. Because if I use this method the script doesn't seem to work unless i make labels for every single item on my extras, including the CG gallery (unless I'm doing something wrong and didn't realize it).
KairuKyun wrote:Couldn't you just

Code: Select all

ShowMenu("extras")
Thats what i did
Huh? ShowMenu is a screen command, right? Will it work from a label?

Currently this is what my codes look like:

Code: Select all

screen extras:

    # This ensures that any other menu screen is replaced.
    tag menu
    
    imagemap:
        ground 'extrasidle.jpg'
        idle 'extrasidle.jpg'
        hover 'extrashover.jpg'
        
       
        hotspot (20, 15, 100, 100) action Return()  activate_sound "click.wav"
        hotspot (23, 146, 457, 121) action ShowMenu("cg") activate_sound "click.wav"
        hotspot (23, 272, 457, 121) action Start("bonusscene") activate_sound "click.wav" 
And then in script.rpy:

Code: Select all

label bonusscene
    "blahblah"
    return

philat
Eileen-Class Veteran
Posts: 1912
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: Returning to "Extras" menu instead of main menu

#6 Post by philat »

Read the whole document. There's a locked argument for the Replay action. If you set it to false, you can use it for new scenes.

User avatar
Alera
Miko-Class Veteran
Posts: 651
Joined: Sun Mar 21, 2010 3:20 am
Completed: Tortichki // Zayay // Hero's Spirit
Deviantart: psyalera
itch: psyalera
Location: UK
Contact:

Re: Returning to "Extras" menu instead of main menu

#7 Post by Alera »

If you're using a screen, wouldn't a simple 'show/call screen' at the end of your scene work? Or maybe I'm misunderstanding the situation.
Image
Games:
❤️ Zayay [Otome?][BxPlayer][NaNo 2013]
❤️ Tortichki [Drag&Drop mini game]

Other games I've worked on:
My Heart's Flame Emissary of Starlight Freedom From Silence Sickness
And many more unannounced/secret projects. (. .)

User avatar
AERenoir
Veteran
Posts: 320
Joined: Fri May 27, 2011 8:23 pm
Contact:

Re: Returning to "Extras" menu instead of main menu

#8 Post by AERenoir »

philat wrote:Read the whole document. There's a locked argument for the Replay action. If you set it to false, you can use it for new scenes.
I did read the entire thing, but I didn't get what the True/False setting does.
Got it to work now, thanks!

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]