Show Menu after clicking through the dialogue

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
lorenzopolo
Newbie
Posts: 6
Joined: Tue Jul 14, 2020 10:12 am
Contact:

Show Menu after clicking through the dialogue

#1 Post by lorenzopolo »

There is a function that allows me to show a menu after clicking on a button. Is there a way for me to show the menu after clicking through text/dialogue? As in it will appear after the player has clicked through the text?

User avatar
dGameBoy101b
Regular
Posts: 31
Joined: Sun Aug 12, 2018 8:32 am
itch: dgameboy101b
Contact:

Re: Show Menu after clicking through the dialogue

#2 Post by dGameBoy101b »

One way to achieve this is to call a label as the button's action which then uses normal renpy statements to display the dialogue and then the menu. Finally, the labelled section can return control back to the button. It is key however that this labelled section is declared before the start label so it's not encountered during the main control flow.

Code: Select all

label foo:
    "This is dialogue."
    menu:
        "Choices..."
        "Option A":
            "You chose A."
        "Option B":
            "You chose B."
    return

screen bar:
    button "Click Me":
        action Call("foo")

label start:
    show screen bar

lorenzopolo
Newbie
Posts: 6
Joined: Tue Jul 14, 2020 10:12 am
Contact:

Re: Show Menu after clicking through the dialogue

#3 Post by lorenzopolo »

I didn't know that, thank you! However, I should've been more specific as the ShowMenu that I was referring to was of the screens like this:

Code: Select all

textbutton "something":
	action [ShowMenu("map_screen")]
This is used in a button, but I would like to trigger it after the player has clicked through the dialogue.

I am trying to show a map where the player would be able to select their destination, hiding the dialogue. I have a workaround of manually hiding stuff, but I'm trying to find a more efficient way to do it.

Post Reply

Who is online

Users browsing this forum: No registered users