Cycling back to menus

A place to discuss things that aren't specific to any one creator or game.
Forum rules
Ren'Py specific questions should be posted in the Ren'Py Questions and Annoucements forum, not here.
Post Reply
Message
Author
E1craZ4life
Newbie
Posts: 2
Joined: Sun Jan 27, 2019 10:14 am
Contact:

Cycling back to menus

#1 Post by E1craZ4life »

I'm trying to build a part where you interact with four different people one at a time in any order the player wants. What this entails:

The first time you reach a menu, all four characters are presented as options. You pick one, and when you complete that branch, you go back to the menu with the option you selected previously removed from the menu. Rinse and repeat until all the options have been selected, and then continue with the story.

How do you do that?

User avatar
Alex
Lemma-Class Veteran
Posts: 3090
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Cycling back to menus

#2 Post by Alex »

You can apply conditions to menu choices to make them appear or not, also you can name the menu and jump to it later. Try

Code: Select all

default john = False
default jane = False
label start:
    "..."
    menu my_menu:
        "Talk to John" if not john:
            jump john_talk
        "Talk to Jane" if not jane:
            jump jane_talk
        "Continue" if john and jane:
            pass
    "Done."
    return

label john_talk:
    "Bla-bla..."
    $ john = True
    jump my_menu


label jane_talk:
    "Bla-bla-bla-bla-bla-bla-bla..."
    "(some hours later) ... bla-bla..."
    $ jane = True
    jump my_menu
https://www.renpy.org/doc/html/menus.html
https://www.renpy.org/doc/html/python.h ... -statement

Post Reply

Who is online

Users browsing this forum: No registered users