[Question] How differ choice menu
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.
- Ageha
- Regular
- Posts: 38
- Joined: Wed Apr 20, 2011 11:08 am
- Tumblr: agehaatlas
- Deviantart: Ageha1304
- Contact:
[Question] How differ choice menu
So I got a little problem. I want to make a choice where one choice appears depending on a choice had made before. How can I do this?
- SundownKid
- Lemma-Class Veteran
- Posts: 2299
- Joined: Mon Feb 06, 2012 9:50 pm
- Completed: Icebound, Selenon Rising Ep. 1-2
- Projects: Selenon Rising Ep. 3-4
- Organization: Fastermind Games
- Deviantart: sundownkid
- Location: NYC
- Contact:
Re: [Question] How differ choice menu
You can do it like:
Code: Select all
menu:
"Open the door.":
"I opened the front door."
"Sneak in the back door." if superspy == True:
"I was able to sneak in without anyone noticing."
"Break through the ceiling." if thief == True:
"I broke through the ceiling instead."Re: [Question] How differ choice menu
To further elaborate on SundownKid's answer, just make sure to set a variable in the previous choice. That's what you're checking here.
So if in some part of your game you had a choice like...
You can then utilize the code that Sundown posted, checking for the variables you set earlier when the player made those decisions that set them.
So if in some part of your game you had a choice like...
Code: Select all
menu:
"Become a spy":
$ superspy = True
jump spy
"Become a thief":
$ thief = True
jump thief
"Become a cop":
jump cop
- Ageha
- Regular
- Posts: 38
- Joined: Wed Apr 20, 2011 11:08 am
- Tumblr: agehaatlas
- Deviantart: Ageha1304
- Contact:
Re: [Question] How differ choice menu
Thank you! Everything works just like it should! 
Who is online
Users browsing this forum: Google [Bot]
