HOW TO: Nested Choices


#1

Hi there!
I will talk about how nested choices are done : )

Here’s a sample of what a generic nested choice looks like:

NARR
What choice would you like to pick?

choice
“Choice one” {

    NARR
You chose CHOICE1.

gain CHOICE1

} “Choice two”{

    NARR
You chose CHOICE2.

}

    NARR
And what is the second choice that you would like to pick?

choice
“Choice A” {

    NARR
You chose CHOICEA.

gain CHOICEA

} “Choice B”{

    NARR
You chose CHOICEB.

}

if (CHOICE1){
if (CHOICEA){

    NARR 
The scene for CHOICE1 and CHOICEA would occur here.

} else {

    NARR 
The scene for CHOICE1 and CHOICEB would occur here.

#notice below this line there are TWO closing braces
}} else {

if (CHOICEA) {

    NARR 
The scene for CHOICE2 and CHOICEA would occur here.

}else {

    NARR 
The scene for CHOICE2 and CHOICEB would occur here.

}
}

@pause for a beat

So, an example would be:

NARR
What type of ice cream flavor do you want?

choice
“Chocolate” {

    NARR
    You chose chocolate.

gain CHOCOLATE

} “Vanilla”{

    NARR
    You chose 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.

}

if (CHOCOLATE){
if (SPRINKLES){

NARR
The scene for chocolate flavored ice cream with sprinkles goes here.

} else {

NARR
The scene for chocolate flavored ice cream with no sprinkles goes here.

#notice below this line there are TWO closing braces
}} else {

if (SPRINKLES) {
NARR
The scene for vanilla flavored ice cream with sprinkles goes here.

}else {

NARR
The scene for vanilla flavored ice cream with no sprinkles goes here.

}
}

@pause for a beat

Of course, the nested choice you write will include more dialogue and more detail, this is a pretty simple one : )

I hope this helps :sparkling_heart:


Multiple Choices and Choices within the choices
Different choice ideas?
#2

I scripted it just like your example. The writer portal did not say that there was an error but when I preview it, it goes through both the "if"s instead of just one. Please help


#3

You absolute gem… Jem :laughing: :heart:


#4

Hi, it should work!
Did you try re-setting the flags?
Here’s how to do it:



Hope it does work for you :green_heart:


I really need help with keeping Choices Between Stories
JemU776's Help Thread
Gains/if and else/choices
The dressing game
I'm having trouble with choices
#5

Thanks!


#6

Thanks so much
This saved me alot of time


#7

No problem : )
Thank you for showing support by liking <3
It means a lot to me :sunglasses::heart:


#8

Thank you everyone for your nice comments :sparkling_heart:


#9

I have now switched to goto for the nested choices but my script will still only play one of the conditions

I currently have a script that looks something like below. When I play through for both of the nested options I get if (option1nestedchoice) for both flags option1nestedchoice and option2nestedchoice. This is my first attempt at nested choices, what am I doing wrong?

  NARRATOR

Dialogue
choice
“Option 1 in Choice 1.”{
gain option1choice1
#bunch of stuff happens

choice
“Option 1 in Nested Choice for Choice 1.”
{
gain option1nestedchoice
}
“Option 2 in Nested Choice for Choice 1.”{
gain option2nestedchoice
}
#more stuff happens
if (option1nestedchoice) {
#stuff happens
}
elif (option2nestedchoice){
#different stuff happens
}

}“Option 2 in Choice 1.” {
#other stuff
}


#10

NARR
Dialogue.

choice
“Option 1 in Choice 1.”{

#bunch of stuff happens

gain option1choice1

} “Option 2 in Choice 1.”{

#other stuff

}

NARR
Dialogue.

choice
“Option 1 in Nested Choice for Choice 1.” {

#stuff happens

gain option1nestedchoice

} “Option 2 in Nested Choice for Choice 1.”{

#stuff happens

}

if (option1choice1){
if (option1nestedchoice){

NARR
The scene for Option 1 in Choice 1 AND Option 1 in Nested Choice for Choice 1 goes here.

} else {

NARR

The scene for Option 1 in Choice 1 AND Option 2 in Nested Choice for Choice 1 goes here.

}} else {

if (option1nestedchoice) {

NARR
The scene for Option 2 in Choice 1 AND Option 1 in Nested Choice for Choice 1 goes here.

}else {

NARR

The scene for Option 2 in Choice 1 AND Option 2 in Nested Choice for Choice 1 goes here.

}
}

@pause for 0


#11

Bumping this :sunglasses:


#12

Another tiny bump :grin::tulip:


#13

Is it too soon to bump? :sweat_smile:
I think not :sunglasses::fries:


#14

Another tiny bump, so tiny…:pleading_face::pleading_face::pleading_face:


#15

Bumping this ^^
:green_heart::purple_heart::grin::purple_heart::green_heart:


#16

Bumping this ^^


#17

Bump ^^


#18

Bump : )


#19

Bump :grin:


#20

Bumping this : )