Conditional Menus?
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.
Conditional Menus?
Would it be possible to have a menu with questions that are only unlocked if a variable is set to true? If so how would I do it?
- RicharDann
- Veteran
- Posts: 286
- Joined: Thu Aug 31, 2017 11:47 am
- Contact:
Re: Conditional Menus?
You just need to add an if statement after the choice.
For a more detailed explanation and example see here.
Code: Select all
default beach_unlocked = True
label start:
menu:
"Go to the park":
"I guess I'll go to the park."
"Go to the beach" if beach_unlocked: #will only appear if beach_unlocked is True
"Let's go to the beach!"
The most important step is always the next one.
Who is online
Users browsing this forum: Majestic-12 [Bot], Toma