How do I create a multiple outcome 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.
How do I create a multiple outcome menu?
How do I do it? I already tried to make one, and it didn't work out.
-
- Veteran
- Posts: 203
- Joined: Mon Mar 07, 2011 3:57 pm
- Projects: Maid of Midsummer (LifeSim)
- Location: (' )< Swimming in your fishbowl, nomming on flakes.
- Contact:
Re: How do I create a multiple outcome menu?
The main problem I can see is your placement of labels. Your labels should be outside of the menus. Anywhere is fine, jump 'label' will find that label no matter where it is.
Furthermore, anything underneath that label should be indented.
I'm not sure if 'return' is appropriate here, unless you used call 'label' earlier in the script somewhere.
Furthermore, anything underneath that label should be indented.
I'm not sure if 'return' is appropriate here, unless you used call 'label' earlier in the script somewhere.
Re: How do I create a multiple outcome menu?
It says it can't find either label. D:
-
- Veteran
- Posts: 203
- Joined: Mon Mar 07, 2011 3:57 pm
- Projects: Maid of Midsummer (LifeSim)
- Location: (' )< Swimming in your fishbowl, nomming on flakes.
- Contact:
Re: How do I create a multiple outcome menu?
Ah, I just noticed now that your jump 'label's, you don't refer to the right label.
try changing it to
jump choice1_yes
and
jump choice2_no
try changing it to
jump choice1_yes
and
jump choice2_no
-
- Veteran
- Posts: 203
- Joined: Mon Mar 07, 2011 3:57 pm
- Projects: Maid of Midsummer (LifeSim)
- Location: (' )< Swimming in your fishbowl, nomming on flakes.
- Contact:
Re: How do I create a multiple outcome menu?
Uh... not quite.
just this by itself is enough for a menu. However, you need to set up your labels somewhere. For example, you could do it like this this:
However, if you do it this way, after jumping to label choice1_yes, it will automatically go to label choice2_no, simply because the two labels are right next to eachother, unless under label choice1_yes you have a jump to another label elsewhere. Alternatively, here's a better way of doing this.
Is this what you were trying to go for?
Code: Select all
menu:
"Yes":
jump choice1_yes
"No":
jump choice2_no
Code: Select all
menu:
"Yes":
jump choice1_yes
"No":
jump choice2_no
label choice1_yes:
"Your choice was yes."
label choice2_no:
"Your choice was no."
Code: Select all
label start:
menu:
"Yes":
"You chose Yes."
pass
"No":
"You chose No."
pass
"15 minutes later..."
Who is online
Users browsing this forum: Bing [Bot], MisterPinetree