I'm planning a murder mystery game. This is my second game on RenPy so I know how to do some things on it, but I was wondering if it was possible to have menu options only show up if a variable is true. For more context, I'm planning on making each clue boolean variable all set to false until the player finds them. Then, if they want to solve the murder there will be a menu that says "What happened?" and list any relevant clues that the user has found, then once they click a clue and another menu will show "why did it happen?" and again list any relevant clues that the user has found, and then the last menu is "who did it?" and the options are again relevant clues the user has found.
But is that possible to make a menu option only show up if a variable is true or will I have to make a bunch of different menus for each possibility? I would like to know before I start coding just so I don't waste time planning for things that can't happen
Menu that depends on true/false variables [Solved]
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.
Menu that depends on true/false variables [Solved]
Last edited by justsam on Fri Sep 16, 2022 7:13 pm, edited 1 time in total.
- Ocelot
- Eileen-Class Veteran
- Posts: 1882
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: Menu that depends on true/false variables
Yes:
Code: Select all
default hint_found = False
label start:
"hame start"
menu:
"Did you find the hint?"
"Yes":
$ hint_found = True
"No":
pass
"some time later"
menu:
"Do you know what happened?"
"Yes" if hint_found:
"Good"
"No":
"Too bad."
"The end."
return< < insert Rick Cook quote here > >
Re: Menu that depends on true/false variables [Solved]
Thank you so much!
Who is online
Users browsing this forum: Bing [Bot], Google [Bot], Majestic-12 [Bot]