HOW TO: Triple Nested Choice :blob_hearts:

Here I go (an example):

First, the three different choices:

INT. BLACK - NIGHT

&zoom reset

&speechbubble reset

NARR
What type of ice cream flavor do you want?

choice
“Chocolate”{

NARR
You chose chocolate.

gain CHOCOLATE

} “Vanilla”{

NARR
You chose vanilla.

gain VANILLA

}

NARR
And would you like sprinkles?

choice
“Yes” {

NARR
You chose to add sprinkles.

gain SPRINKLES

}“No”{

NARR
You chose to add no sprinkles.

gain NO_SPRINKLES

}

NARR
A cone or a bowl?

choice
“Cone”{

NARR
You chose a cone.

gain CONE

}“Bowl”{

NARR
You chose a bowl.

gain BOWL

}

And now to remember it:

1. Shorter Version

if (CHOCOLATE) {
if (SPRINKLES) {
if (CONE) {
NARR
Chocolate with sprinkles and a cone.
} else {
NARR
Chocolate with sprinkles and a bowl.
}
} else {
if (CONE) {
NARR
Chocolate without sprinkles and with a cone.
} else {
NARR
Chocolate without sprinkles and with a bowl.
}
}
} else {
if (SPRINKLES) {
if (CONE) {
NARR
Vanilla with sprinkles and with a cone.
} else {
NARR
Vanilla with sprinkles and with a bowl.
}
} else {
if (CONE) {
NARR
Vanilla without sprinkles and with a cone.
} else {
NARR
Vanilla without sprinkles and with a bowl.
}
}
}

Thank you to @CoraMae for writing and suggesting this <3 I wanted to do it this way but I decided to go with the longer version where you can see where everything is :heart:

2. The Longer Version Showing Where Everything is

if (CHOCOLATE){
if (SPRINKLES){
if (CONE){

NARR
Chocolate with sprinkles and a cone.

}}}

if (CHOCOLATE){
if (NO_SPRINKLES){
if (BOWL){

NARR
Chocolate with no sprinkles and a bowl.

}}}

if (CHOCOLATE){
if (SPRINKLES){
if (BOWL){

NARR
Chocolate with sprinkles and a bowl.

}}}

if (CHOCOLATE){
if (NO_SPRINKLES){
if (CONE){

NARR
Chocolate with no sprinkles and a cone.

}}}

if (VANILLA){
if (SPRINKLES){
if (CONE){

NARR
Vanilla with sprinkles and a cone.

}}}

if (VANILLA){
if (NO_SPRINKLES){
if (BOWL){

NARR
Vanilla with no sprinkles and a bowl.

}}}

if (VANILLA){
if (SPRINKLES){
if (BOWL){

NARR
Vanilla with sprinkles and a bowl.

}}}

if (VANILLA){
if (NO_SPRINKLES){
if (CONE){

NARR
Vanilla with no sprinkles and a cone.

}}}

P.S Feel free to test this code out, I went over it many times and it ran smoothly but if you come across any problems, let me know ^^

Thank you for checking this out! :icecream: :disco:

OK, now for real, thank you and see you soon XOXO <3 <3 <3

Check out the topic on double nested choices: HOW TO: Nested Choices
Check out the topic on resetting story progress (you’ll need to reset your flags-which are gains-to test other paths): HOW TO: Reset Story Progress + Bonus Stuff :blob_sun:
More helpful threads to check out: "List" of Helpful Threads

Much love, JemU776 :hibiscus:

14 Likes

You’re so awesome for doing this for us dummies haha…I’m definitely gonna test this out :stuck_out_tongue_winking_eye:YOU’RE AWESOMEEEEE JEMMYYYY :purple_heart::purple_heart::clap:t4::clap:t4::purple_heart::purple_heart:

1 Like

I don’t think this would work because if someone gained, let’s say, chocolate, they would see the branching for anything that includes if (chocolate), right? i might be wrong actually

It would be nice to confirm in case, it works for me. Would you mind testing it and letting me know what you get? :thinking:

Feels like it can be shorten.

Remembering:

if (CHOCOLATE) {
if (SPRINKLES) {
if (CONE) {
NARR
Chocolate with sprinkles and a cone.
} else {
NARR
Chocolate with sprinkles and a bowl.
}
} else {
if (CONE) {
NARR
Chocolate without sprinkles and with a cone.
} else {
NARR
Chocolate without sprinkles and with a bowl.
}
}
} else {
if (SPRINKLES) {
if (CONE) {
NARR
Vanilla with sprinkles and with a cone.
} else {
NARR
Vanilla with sprinkles and with a bowl.
}
} else {
if (CONE) {
NARR
Vanilla without sprinkles and with a cone.
} else {
NARR
Vanilla without sprinkles and with a bowl.
}
}
}

1 Like

You’re awesome! I had a hard time figuring out how to remember two choices at once, but now I do because of you! Thank you so much!

2 Likes

Bump :slightly_smiling_face:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.