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.
Visible but unselectable menu choices?
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.
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.
- MadeVeryMerry
- Newbie
- Posts: 12
- Joined: Wed Nov 11, 2015 12:52 am
- Contact:
-
- 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?
Probably not the best way but you can create a list:
Then when they discover the clue is not correct, change the value to true.
and finally, when they select the menu option that they already know is 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, etc]
Code: Select all
$clue_known[0] = True
Code: Select all
if clue_known[0] is True:
"You already know that's wrong."
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
- MadeVeryMerry
- Newbie
- Posts: 12
- Joined: Wed Nov 11, 2015 12:52 am
- Contact:
Re: Visible but unselectable menu choices?
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!
Who is online
Users browsing this forum: No registered users