Page 1 of 1

Nested menu choices

Posted: Sun Dec 26, 2021 7:28 pm
by Phoenyx75
I was wondering whether it's possible to do menu choices immediately after having already done so. So, for instance, first a menu that asks what someone would like to talk about, with 3 choices, and then once they pick one, whether they believe something, and they can answer either yes or no. I've looked at the documentation and it doesn't seem to say if this is possible, but I imagine it is.

Re: Nested menu choices

Posted: Tue Dec 28, 2021 8:59 am
by Per K Grok
Phoenyx75 wrote:
Sun Dec 26, 2021 7:28 pm
I was wondering whether it's possible to do menu choices immediately after having already done so. So, for instance, first a menu that asks what someone would like to talk about, with 3 choices, and then once they pick one, whether they believe something, and they can answer either yes or no. I've looked at the documentation and it doesn't seem to say if this is possible, but I imagine it is.
Not sure if this covers what you are looking for.

Code: Select all

    menu menu1 :
        "Pick 1":
            jump menu2
        "Pick 2":
            jump menu2
        "Pick 3":
            jump menu2

    menu menu2:
        "Yes":
            jump menu1
        "No":
            jump menu1

Re: Nested menu choices

Posted: Tue Dec 28, 2021 1:14 pm
by Alex
The same mechanic, but looks more like nested menus (named menus make it possible to jump to one or another like one can jump to labels)

Code: Select all

label start:
    a "Some questions..."
    menu menu_1:
        "What would you like to talk about?"
        "Weather":
            menu menu_1_1:
                "How do you like the local weather?"
                "Fine":
                    b "It's fine... rain, cold wind and all - it's just fine."
                    jump menu_1
                    
                "Awful":
                    b "Are you kidding? It's been raining since I arrived!"
                    jump menu_1

        "Some other topic":
            menu menu_1_2:
                "2 + 2 = ?"
                "Four":
                    b "Everybody knows it."
                    jump menu_1
                    
                "Three to Five":
                    b "That depends of..."
                    a "Khm, try again."
                    jump menu_1_2

        "End conversation":
            b "Enough talking for today..."
    a "Well..."

Re: Nested menu choices

Posted: Tue Jan 11, 2022 8:42 pm
by Phoenyx75
Thanks, Per and Alex :-). I actually got a response in the renpy Discord forum that got me a working version, but I am bookmarking this thread in case I need more info on this subject later.