HOW TO: Remember Past Choices (if/elif/else)


#1

FIRST AND FOREMOST, to remember choices, you will need to use the if/elif/else code, which looks like this:

if (label1) {
} elif (label2) {
} else {
}

if is always first, elif is always in the middle, and else should always be the last one by itself

if you have 2 options, you only need to use if and else
if (label) {
} else {
}

if you have 3 options, use if then elif then else
if (label1) {
} elif (label2) {
} else {
}

if you have more than 3 options, keep using elif for the middle parts, but always make sure that if is first and else is last
if (label1) {
} elif (label2) {
} elif (label3) {
} elif (label4) {
} else {
}

There are 2 methods to remembering past choices:

1- The choice name and option method
2- Using GAINS

1. Choice Name & Option Method

Name your choice by adding the name next to the word choice and put it inside parentheses. Choice names cannot have spaces: they can only be consisted of letters, numbers, and/or underscores.

Here is an example:

NARRATOR
What do you want to eat?

choice (FOOD)
“Spaghetti” {

} “Donuts” {

} “Sandwich” {
}

TO REMEMBER THE ABOVE CHOICE, USE THE IF/ELIF/ELSE CODE WITH THIS FORMAT: (choice_name is "Option Name")

if (FOOD is “Spaghetti”) {
[scene for spaghetti choice here]

} elif (FOOD is “Donuts”) {
[scene for donuts choice here]

} else {
[scene for sandwhich choice here]
}

NOTES:
This is the best method to use for dressing games!
CLICK HERE for a simple dressing game template!

This method will not work with a customization template or repeated choices:

Customization templates have repeated choices. Inside each choice is a goto that leads back to the label to start the choice over again, so technically whatever choice you tapped on does not get remembered since the choice gets repeated.

Your choice name and option titles need to match exactly

If your choice name is “YUM_food” and your option name is “I LoVe DonuTS!!”, then the format for the if/elif/else needs to be (YUM_food is “I LoVe DonuTS!!”)

Wrap straight brackets around the choice name to reference that option in dialogue

You can use the choice name to reference what the reader chose in dialogue; just wrap straight brackets around the choice name.

CHARACTER
Today I had [FOOD] for lunch.

If the reader chose “Spaghetti”, then they will see:

CHARACTER
Today I had Spaghetti for lunch.

(but be warned that whatever option title is will be what the reader will see)
If the option title was “I want to eat Spaghetti!!”, then readers will see this:

CHARACTER
Today I had I want to eat Spaghetti!! for lunch.

2. USING FLAGS/GAINS

You can have your readers gain certain flags by just using the code: gain flag_name

Here is an example:

NARRATOR
What do you want to drink?

choice
“Orange Juice” {
gain orange_juice

} “Coffee” {
gain coffee

} “Water” {
gain water
}

TO REMEMBER THE ABOVE CHOICE, USE THE IF/ELIF/ELSE CODE WITH JUST THE GAIN NAME INSIDE PARENTHESES ()

if (orange_juice) {
[scene for orange juice here]

} elif (coffee) {
[scene for coffee here]

} else {
[scene for water here]
}

NOTES:

  1. Once a flag is gained, you cannot “un-gain” it. So be sure to not use this method with dressing games. If you do, you will need to put a “yes/no” choice inside each outfit option with the gain inside the “yes” choice. See an example of that HERE
  2. You also cannot use this method with customization templates. A customization template has choices that repeat so you can go back and keep changing your appearance and choosing multiple choices at once. Adding gains to all those choices will result in the reader gaining all of those gains after clicking on all the options.
  3. Gain names cannot have spaces or special characters. They can only have letters, numbers, and/or underscores.

How do i remember outfit choices
If/elif problem
How to save dress choices
Future Episodes for my story: Ink - Remembering Female and Male Customization (CLOSED)
Manna's Help Thread: For coding, directing and more
How do I make clothing choices remember in the next scene or chapter?
Having Trouble Remembering Choices
Dara's Official Help Thread [CLOSED]
Choices from one chapter affecting the other?
Help gain script trouble (better for me to show you)
Dara's Official Help Thread [CLOSED]
Dara's Official Help Thread [CLOSED]
Need help with coding please :-)
Need help with coding please :-)
How do I get my choice to be remembered
How do I get my choice to be remembered
STUPID SMART QUESTION, that need answering
Can anyone help me with my problem?
Writers portal issue - PLS HELP IF YOU CAN!
Help me please 😭
How to carry choices through next episodes?
I Have A Question For Choices
Dara's Official Help Thread [CLOSED]
Remebering Choices
Three different cliffhangers
Help with my script error please
Tara explains: How to have choices that matter without any complex coding!
Tara explains: How to have choices that matter without any complex coding!
"Stupid" questions that never get answered? Get The Help Here!
Skipping Over Branches // Help Me Please
How do you put a choice in one episode and then make them remember it in the next episode?
Is it possible....?
Really need help with my script
Dara's Official Help Thread [CLOSED]
Rude’s Here to Help! Ask your questions babes 💙
How do I get the characters outfits to change depending on a choice
Can I have empty gains
How to let them choose gender?
Dara's Official Help Thread [CLOSED]
SCRIPT ERRORS you just can't seem to fix: [CLOSED]
How to make your relationships effect the ending of your story?
Rude’s Here to Help! Ask your questions babes 💙
Yay's Official Help Thread (CODING HELP, AND MORE!)
"Stupid" questions that never get answered? Get The Help Here!
SCRIPT ERRORS you just can't seem to fix: [CLOSED]
Can anyone explain me about the gains and the ifs?
REMEMBERING! choices HELPPPPP
Choices Carrying Over Between Episodes
Gem Choice for Dressing Up - Directing HELP!
Unexpected String :(
Help with Remembering Choices
Help With Remembering Choices!
Directing Problem: Smooth Directing
"Stupid" questions that never get answered? Get The Help Here!
Needing help please
Adding gem choices
How to continue a label from a previous choice
Dara's Official Help Thread [CLOSED]
Dara's Official Help Thread [CLOSED]
Dara's Official Help Thread [CLOSED]
Help with If, Elif, Else!
Trouble with remembering past choices
Dara's Official Help Thread [CLOSED]
I need help saving choices
Please help me ;-;
How do I put a remembered choice?
A Guide to Typed-in Choices
If/elif/else /gains HELP
There is a { on line 750 that does not have a matching
How can you remember a past choice
Directing Help please!:)
How to Remember Choices?
If/Elif/Else Between Episodes
Help me with this error on remembering choices
Reader Choices and other issues :/
It's Not Working
HELP ME "There is a { on line 1398 that does not have a matching }" HELP ME
Using advanced choices. (The simple ones,)
Remembering Choices Error
Dara's Official Help Thread [CLOSED]
Rude’s Here to Help! Ask your questions babes 💙
Dara's Official Help Thread [CLOSED]
I need help - In need of some assistance
I'm having trouble with changing outfits (HELP)
Winter - Here to Help: Advice & Questions!
Dara's Official Help Thread [CLOSED]
Remembering past choices
Need help with advanced choices!
Dara's Official Help Thread [CLOSED]
A Complete List of Props and How to Use Them (Hidden Props Also!)
A coding question regarding conditions
"Stupid" questions that never get answered? Get The Help Here!
Using more than one gain in choices
Directing Help and Assistance From a Purple Ghost For All Your Episode Needs
Character mentions another characters choice, please help!
Dara's Official Help Thread [CLOSED]
Dara's Official Help Thread [CLOSED]
Dara's Official Help Thread [CLOSED]
I need help with outfit choices
Manna's Help Thread: For coding, directing and more
Dara's Official Help Thread [CLOSED]
Making Choices - advanced
Complex choices
Help? (Again) Errors? :fearful:
Dara's Official Help Thread [CLOSED]
Dara's Official Help Thread [CLOSED]
Dara's Official Help Thread [CLOSED]
:grin: Resources for Creators
Directing Help and Assistance From a Purple Ghost For All Your Episode Needs
"Stupid" questions that never get answered? Get The Help Here!
Automatically to the first option of the choice
"Stupid" questions that never get answered? Get The Help Here!
Keeping same outfit to next episode, help?
I need help with the "dressing up" aspect of choices on Episode
Do you need help? Well help is here!
Rude’s Here to Help! Ask your questions babes 💙
"Stupid" questions that never get answered? Get The Help Here!
"Stupid" questions that never get answered? Get The Help Here!
Dara's Official Help Thread [CLOSED]
"Stupid" questions that never get answered? Get The Help Here!
Dara's Official Help Thread [CLOSED]
I need help with the points system/ remembering past choices / gains
Big choices in story
Branching on episode
I really need someone to help me with a few questions i have about creating a story
Dara's Official Help Thread [CLOSED]
Choice Not Being Remembered
I need help remembering!
Rude’s Here to Help! Ask your questions babes 💙
Dara's Official Help Thread [CLOSED]
How do I do "Or" in Episode?
Dara's Official Help Thread [CLOSED]
Dara's Official Help Thread [CLOSED]
The Points System
Multiple Love Interests
If, elif, else problem
Rude’s Here to Help! Ask your questions babes 💙
Need help with the choices script
How to use the if/elif/else coding?
How to use the if/elif/else coding?
How do I make a choice from a previous episode continue?
Dara's Official Help Thread [CLOSED]
Dara's Official Help Thread [CLOSED]
Dara's Official Help Thread [CLOSED]
Im trying to remeber choice
Dara's Official Help Thread [CLOSED]
"Stupid" questions that never get answered? Get The Help Here!
Dara's Official Help Thread [CLOSED]
I'm having trouble with choices
WHy is this error occuring?!
Looking for help with complex choices
SCRIPT ERRORS you just can't seem to fix: [CLOSED]
Dara's Official Help Thread [CLOSED]
#2

but I’ve never used “else” cuz it didn’t work at all :confused:


#3

If you’re using gains, you have to remember to reset story progress. Otherwise it should always work.


#4

Can you do that on mobile?


#5

Mobile creation? No you can’t. This is only for directing using the script in the writer’s portal online.


Dara's Official Help Thread [CLOSED]
#6

alright thank you!


OUTFIT CHOICE,help
#7

do u have to use [ outfit changing scene] ?


#8

No you replace that with your outfit changing script scene.


#9

oh what? sorry im vv confused now


#10

[outfit changing scene] gets replaced with the script/commands to have your character change into the outfits

so this:

choice
"Short Dress" {
[outfit changing scene]

changes into this: (or whatever you want)

choice
"Short Dress" {
@CHARACTER changes into Outfit
@CHARACTER is blush

How to do choices with clothes
#11

ohhh thanks :pray:t4: :sparkling_heart:


#12

How do you reset gains


#13

You can’t, unfortunately.


Script Troubles
#14

hi , I’m a little confused and i need your help.
it keeps saying that error and i don’t know what to do.


#15

What’s after the “hell no” choice in your script?


#16

nothing , but another label.


#17

Then there should be 1 more ending bracket at the end:

}
“Hell no!” {

goto choosing_outfits

}
}


#18

Thank you so much!!! it finally worked :heart:


#19

i’m sorry to bother you again but i have come across another problem.


#20

“else” needs to be by itself

} else {