Visible but unselectable menu choices?

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
MadeVeryMerry
Newbie
Posts: 12
Joined: Wed Nov 11, 2015 12:52 am
Contact:

Visible but unselectable menu choices?

#1 Post by MadeVeryMerry »

Hi, quick question! Is it possible to write a menu wherein choices are visible, but not able to be selected (e.g. greyed out)? I'm writing a sort of Clue-like minigame (despite being a beginner, because I guess I'm a masochist) and I'd like the known clues (the impossible choices) to be visible, to remind the player of what they already know, but not selectable.

Furthermore, this is probably going to be an event that loops around to the same menu a few times, so what variable can/should I add to make choices unselectable? e.g., Miss White is available as an option at first, but when the player learns that she can't be the killer, her name is greyed out so she can't be selected again.

Thanks for any help y'all can give me. :)

mikolajspy
Regular
Posts: 169
Joined: Sun Jun 04, 2017 12:05 pm
Completed: Too many, check signature
Deviantart: mikolajspy
Location: Wrocław, Poland
Contact:

Re: Visible but unselectable menu choices?

#2 Post by mikolajspy »


Xasrai
Newbie
Posts: 11
Joined: Wed Dec 14, 2016 5:27 am
Contact:

Re: Visible but unselectable menu choices?

#3 Post by Xasrai »

Probably not the best way but you can create a list:

Code: Select all

define: clue_known = [False, False, etc]
Then when they discover the clue is not correct, change the value to true.

Code: Select all

 $clue_known[0] = True 
and finally, when they select the menu option that they already know is wrong:

Code: Select all

 if clue_known[0] is True:
    "You already know that's wrong."
You just have to keep a list of which list position is allocated to which clue and you are good.

Edit:

I've just written it up to check that it's working but this is what I mean.:

Code: Select all

 define clue_known = [False, False]



"Hello how are you?"

label test:
    menu:
        "Is clue 0 the killer?":
            if clue_known[0] is True:
                "You already know that's wrong."
                jump test
            e "No, clue 0 is not the killer."
            $ clue_known[0] = True
            jump test
        
        "Let's end this charade":
            jump end

label end:
    return

User avatar
MadeVeryMerry
Newbie
Posts: 12
Joined: Wed Nov 11, 2015 12:52 am
Contact:

Re: Visible but unselectable menu choices?

#4 Post by MadeVeryMerry »

mikolajspy wrote: Wed Oct 25, 2017 12:46 am Check this thread: viewtopic.php?f=8&t=45176&p=461928 :)
I somehow completely missed this! I trawled back through pages of the forum but didn't find anything. My -5 to Perception strikes again.

Thank you, I'll check this out and put any further questions in there!

Post Reply

Who is online

Users browsing this forum: No registered users