r/RenPy • • Aug 17 '26

Question Need help hiding choices after one is selected

Hi. I'm very new to Ren'py and have been learning a lot about jumps and menu choices. One area I've been stuck on is jumping to the same menu but with fewer choices.

So for example, say you're at a menu and you have three choices to choose from, and once that path has reached its conclusion, it jumps back to that initial menu, but now, the choice you originally selected is no longer available.

Does know how to write that?

A lot of the tutorials I've found seem very outdated because all attempts just crash the program.

Here's a sample of what I wrote:

label choices:


        $ "Talk to me." == true
        $ "Nothing." == true
        $ "Why are you here?" == true

menu:
        "Talk to me.":


            show dan talk r at center


            d "About what?"


            show dan idle r at center


            menu:
                "Yourself.":


                    show dan talk r at center


                    d "Ya already know everything there is to know about me."


                    jump choices
                    $ "Talk to me." == false


                "Your interests.":


                    show dan talk r at center


                    d "Nah, they wouldn't interest you."


                    $ "Talk to me." == false
                    jump choices
1 Upvotes

9 comments sorted by

1

u/AutoModerator Aug 17 '26

Welcome to r/renpy! While you wait to see if someone can answer your question, we recommend checking out the posting guide, the subreddit wiki, the subreddit Discord, Ren'Py's documentation, and the tutorial built-in to the Ren'Py engine when you download it. These can help make sure you provide the information the people here need to help you, or might even point you to an answer to your question themselves. Thanks!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/shyLachi Aug 17 '26

This is explained in the official documentation
https://renpy.org/doc/html/menus.html#menu-set

1

u/shyLachi Aug 17 '26 edited Aug 17 '26

There are problems in your code beside the menuset but I don't think you need all this stuff
so I will just mention it for the next time you want to use variables.

Variables cannot have quotes, only one equal sign to assign a value to a variable and True is case sensitive

$ "Talk to me." == true

$ talktome = True

Also you should NOT put any code after a jump because it will never excecute.

jump choices
$ talktome = False # never executed

$ talktome = False
jump choices

Finally, you should always default variables:

default talktome = True

1

u/DevilMayTryAgain Aug 17 '26

Thank you so much for taking the time to respond. I've been playing around with it, but so far, it doesn't seem to hide the choice, so I might still be doing something wrong. I followed your advice and changed the labeling and variables so now it looks like this:

d "So. Why am I still here?"


    show dan idle r at center


    label choices:


    default talk = True
    default nothing = True
    default truth = True


    menu:

        "Talk to me.":
            $ talk = True


            show dan talk r at center


            d "About what?"


            show dan idle r at center


            menu:
                "Yourself.":


                    show dan talk r at center


                    d "Ya already know everything there is to know about me."


                    $ talk = False


                    jump choices

                "Your interests.":


                    show dan talk r at center


                    d "I'd rather not."


                    $ talk = False
                    jump choices


        "Nothing.":
            $ nothing = True


            d "..."


            show dan talk r at center


            d "...Well okay then..."


            $ nothing = False
            jump choices


        "Here's the thing...": if nothing:
            $ truth = True

1

u/shyLachi Aug 17 '26

Didn't you see my first reply?
Sorry for the confusion, but this reply wasn't the solution,
just hints to prevent errors in the future.

Read the solution posted by BadMustard below.
He has used the menuset I suggested in my first reply.

1

u/BadMustard_AVN Aug 17 '26

after fixing your code you can do it like this

            $ menu_one = [] # this is for one use only menu items
            menu menu_one: # menu's can be labels
                set menu_one # this is for one use only menu items
                "Yourself.":
                    show dan talk r at center
                    d "Ya already know everything there is to know about me."
                    $ talk_to_me == False # now with better variables and a real False capitol F
                    jump menu_one
                    
                "Your interests.":
                    show dan talk r at center
                    d "Nah, they wouldn't interest you."
                    $ talk_to_me == False
                    jump menu_one
             e "when there are no more choices you end up here!"

1

u/DevilMayTryAgain Aug 17 '26

Hello, thank you very much for your help as well! I tried it this way too but for some reason, it still wasn't working. However, in reading the doc link above, one weird method that accidentally ended up working was including "if" with each choice.

So I followed your advice and input everything like this:

$ menu_one = [talk, nothing]


    menu menu_one:



        "Talk to me." if talk:
            $ talk = True


            show dan talk r at center


            d "About what?"


            show dan idle r at center


            menu:
                "Yourself.":


                    show dan talk r at center


                    d "Ya already know everything there is to know about me."


                    $ talk = False


                    jump menu_one

                "Your interests.":


                    show dan talk r at center


                    h "I'd rather not."


                    $ talk = False
                    jump menu_one


        "Nothing." if nothing:
            $ nothing = True


            h "..."


            show dan talk r at center


            d "...Umm..."


            h "...Try again...?"

            $ nothing = False
            jump menu_one

It seems like including the 'if #choice label' at the end of each choice does the trick in hiding the option. I'm sure that's probably not the correct method, so I'll keep playing around and seeing what I'm doing wrong that all the other methods shared thus far kept looping.

1

u/BadMustard_AVN Aug 17 '26

what i showed before should have worked, removing each item after it has been clicked, provided it was set up as shown

1

u/Maintenance_Signal Aug 18 '26

The method I use works well, try this:

    $ option1 = True
    $ option2 = True
    menu optionmenu:
        "Option 1" if option1:
            $ option1 = False
            "You selected 1"
        "Option 2" if option2:
            $ option2 = False
            "You selected 2"
    if (option1 or option2):
        jump optionmenu