It is useful to save the results of a choice for use later in the story. A name inside parenthesis next to a choice signifies that the chosen response should be saved as that variable. To use the variable in dialog, surround the variable name in brackets. In this example, a character asks the player’s favorite color, and reacts differently to the choice. Afterward, both branches merge together and the story continues. The character later remembers the choice and repeats it back to the player later.

 

TYLER

What is your favorite color?

 

choice (fav_color)

“Pink” {

 

YOU

I like pink. It is super cute.

Like bunnies!

 

TYLER

How predictable.

 

} “Green” {

 

YOU

I like green.

 

TYLER

Me too.

 

} “Black” {

 

YOU

Black.

Like the cold grip of death.

 

TYLER

That’s dark.

}

 

TYLER

I’ll keep that in mind when I am buying you gifts!

 

YOU

Gifts huh?

 

TYLER

Yeah.

I will be sure to get you something nice and [fav_color].