Once you have set a variable you can later have the user see different parts of the story based on what the variable was set to.  In the example below the user will not see any choices but instead the dialog they see will be based on what they chose as their favorite color previously in the story.

 

YOU

Hi Tyler. Is that present for me?

 

TYLER

Yup. Open it!

 

if (fav_color is “Pink”) {

 

YOU

A pair of pink bunny ears!

So soft!

Thanks! I love it.

 

} elif (fav_color is “Green”) {

 

YOU

A $20 bill?

 

TYLER

Yeah I didn’t know what else to get.

It’s green at least!

 

} else {

 

YOU

It’s empty.

 

TYLER

Black is the absence of light.

Darkness is emptiness

 

YOU

...

 

TYLER

I thought you would like the metaphor.

}