Hello,
Is there a way to lock a menu option. Say if a certain thing has happened not allow the menu option to show up? I know how to make options show up only if a certain variable has taken place. I'm looking for a method to remove the option only if a certain variable has occurred.
Example:
menu:
Choice A - always there
Choice B - there as a part of an if statement
Choice C - sometimes there, but not if certain things have happened to deactivate it
I know how to program the first two choices. I don't know and have been unable to find documentation on the last. Is this possible? Thanks for any help.
Locking a Menu Option [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.
Locking a Menu Option [SOLVED]
Last edited by Suru on Thu Jun 22, 2017 12:43 am, edited 1 time in total.
- trooper6
- Lemma-Class Veteran
- Posts: 3712
- Joined: Sat Jul 09, 2011 10:33 pm
- Projects: A Close Shave
- Location: Medford, MA
- Contact:
Re: Locking a Menu Option
That is still just an if statement.
Let's say you don't want option C to show up if someone was murdered.
If you have a variable called is_alive. You the person is murdered, you make is_alive false, and then:
What if your variable is called is_murdered, then you do:
It is all if statements.
Let's say you don't want option C to show up if someone was murdered.
If you have a variable called is_alive. You the person is murdered, you make is_alive false, and then:
Code: Select all
menu:
"Option A":
"Blah"
"Option B":
"Blah"
"Option C" if is_alive:
"Blah"
Code: Select all
menu:
"Option A":
"Blah"
"Option B":
"Blah"
"Option C" if not is_murdered:
"Blah"
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
Re: Locking a Menu Option
Ah okay, simple enough. Thanks for the swift reply!
Who is online
Users browsing this forum: Google [Bot]