DARA’S GUIDE: Remember Choices with if/elif/else

Can some one help me with my customization script? I’m getting an error at “choice (SKIN1)” saying “Unexpected Expression”.

choice “Skin Tone” {
goto skin1
} “Eye Colour” {
goto eyes1
} “Hair Colour” {
goto hair1
} “Done” {
goto are_you_done_1
}

label skin1
readerMessage Don’t come for me for these cringey skin names.
choice (SKIN1)
“Light Olive” {
@YOU changes bodyColour into Gold 02
@pause for a beat
} “Caramel Tan” {
@YOU changes bodyColour into Neutral 04
@pause for a beat
} “Chocolate Copper”{
@YOU changes bodyColour into Copper 09
@pause for a beat
} “Main Menu” {
goto custom_mc_1
}

label eyes1
choice (EYES1)
“Emerald Green” {
@YOU changes eyeColour into Green Emerald
@pause for a beat
} “Dark Brown” {
@YOU changes eyeColour into Brown Black
@pause for a beat
} “Grave Blue”{
@YOU changes eyeColour into Blue Green
@pause for a beat
} “Main Menu”
goto custom_mc_1
}

label hair1
choice (HAIR1)
“Dirty Blonde”{
@YOU changes hairColour into Dirty Blonde
@pause for a beat
} “Brunette Brown” {
@YOU changes hairColour into Brunette Brown
@pause for a beat
} “Bounding Black” {
@YOU changes hairColour into Black Dark
@pause for a beat
} “Main Menu”{
goto custom_mc_1
}

if (SKIN1 is “Light Olive”) {
gain skin_1_light
} elif (SKIN1 is “Caramel Tan” {
gain skin_1_tan
} else {
gain skin_1_copper
}
if (EYES1 is “Emerald Green”) {
gain eyes_1_green
} elif (EYES is “Dark Brown”) {
} else {
gain eyes_1_green
}
if (HAIR1 is “Dirty Blonde”) {
gain hair_1_blonde
} elif (HAIR1 is “Brunette Brown”) {
gain hair_1_brown
} else {
gain hair_1_black
}
label are_you_done_1
NARRATOR
Are you sure you’re done customizing? You won’t be able to re - customize until episode 5.

choice “Yes, I am done customizing.” {

    NARRATOR
Awesome!

} “No, I am not done customizing.” {
goto custom_mc_1
}

You must have dialogue before every choice.

1 Like

Question, what if I want to remember choices my character made in the previous episode? For example, my character plays the dressing game and changes their hair and makeup, then goes out. If I cut the episode while my character was out and wanted to continue it in the next episode (with my character in the same outfit, hair and makeup they chose in the previous episode) how would I do this?

Any help would be greatly appreciated.

thanks!

You can do that using gains!
For example if you have outfit choices

“Outfit#1” {
gain outfit1
@character changes into outfit1
} “outfit2” {
gain outfit2
@character changes into outfit2
}

Then to remember you will use the if/elif/else
if (outfit1) {
@character changes into outfit1
} else {
@character changes into outfit2
}

I hope that makes sense

1 Like

Thank you so much! Yes this makes sense !! What if I have many options? Like for lip colour or hairstyle? Would I just do elif for most of the choices and then use if for the beginning one and else for the final one?

Well thats like customizing the character and if im not mistaken it will be remembered until you give the choice to change it again

I have a choice where you can be nice to a person or horrible to one, and you gain to their friendship or you gain their hatred, and I wanted to use it later so that if you gained his friendship he would help you escape but if you gained his hatred he wouldn’t, I’ve managed to use the gain part fine but I’ve no idea how to go about the next bit, can someone help me out, or even better send me a template for this? thanks!

Use the if/else to remember the gains

if (friendship_flag) {
#scene for this gain here

} else {
#scene for the hatred gain here
}

Thanks for this!

Hi everyone! I was wondering if some coding wizards could gibe me some advice on this section of code. It’s a point system minigame where depending on your score at the end, you unlock a character. Originally I had the branches for each character inside the if/elif/else but it would only ever show me the first character’s option. I changed it to be with goto labels instead to see if that would fix it, but I still get the first option no matter how many points I get! If I switch the order of the options I will only be able to see the first option. Any thoughts on why this is happening?

if (CARAMEL>2) {
goto clementine
}
elif (SUGAR>2) {
goto ginger
}
else {
goto rosemary
}

Hii!
Try resetting your story progress when you preview your story! :blush:

Nope, I’ve already tried that and it still won’t work :sob: thanks anyway!

Hi!! :heart: @Dara.Amarie
Can you help me please? I’m stuck on this choice.

So basically my character is a vampire and I want to remember the eye and mouth choice. If I click on for example: Brown Black first and then Hazel Dark (because I would like to choose Hazel Dark). The story views it in Brown Black, I think that’s because I chose that first. But How do I fix that? :confused:
I really Hope you can help me out here, because I’m starting to give up lmao :sweat_smile:

So this is what I have now

Label choosing_eyecolor

NARRATOR

Can you tell me which eye color you chose again?

choice [shouldPaginate: YES]

“Black Dark” {

@CHARACTER changes eyesColor into Black Dark

@pause for 1

gain Black_Dark

goto confirm_option2

} “Brown Dark” {

@CHARACTER changes eyesColor into Brown Dark

@pause for 1

gain BROWN_DARK

goto confirm_option2

} “Grey” {

@CHARACTER changes eyesColor into Grey Cool

@pause for 1

gain GREY_COOL

goto confirm_option2

} “Hazel Dark” {

@CHARACTER changes eyesColor into Hazel Dark

@pause for 1

gain HAZEL_DARK

goto confirm_option2

} “Green Emerald” {

@CHARACTER changes eyesColor into Green Emerald

@pause for 1

gain GREEN_EMERALD

goto confirm_option2

} “Brown Pale” {

@CHARACTER changes eyesColor into Brown Pale

@pause for 1

gain BROWN_PALE

goto confirm_option2

} “Brown Light” {

@CHARACTER changes eyesColor into Brown Light

@pause for 1

gain BROWN_LIGHT

goto confirm_option2

} “Hazel” {

@CHARACTER changes eyesColor into Hazel

@pause for 1

gain HAZEL

goto confirm_option2

} “Blue Aqua” {

@CHARACTER changes eyesColor into Blue Aqua

@pause for 1

gain BLUE_AQUA

goto confirm_option2

} “Blue deep” {

@CHARACTER changes eyesColor into Blue Deep

@pause for 1

gain BLUE_DEEP

goto confirm_option2

} “Blue Green” {

@CHARACTER changes eyesColor into Blue Green

@pause for 1

gain BLUE_GREEN

goto confirm_option2

} “Ice Blue” {

@CHARACTER changes eyesColor into Ice Blue

@pause for 1

gain ICE_BLUE

goto confirm_option2

}

label confirm_option2

NARRATOR

Are you sure this is the right Eye color?

choice

“Yes this is the right one!”{

goto Eyes_done

} “No, I need to change it.{

Goto choosing_eyecolor

}

label Eyes_done

And to change it back to:
if (BLACK_DARK) {

@CHARACHTER changes eyesColor into Black Dark

goto change_color_back

} elif (BROWN_DARK) {

@CHARACTER changes eyesColor into Brown Dark

goto change_color_back

} elif (GREY_COOL) {

@CHARACTER changes eyesColor into Grey Cool

goto change_color_back

} elif (HAZEL_DARK) {

@CHARACTER changes eyesColor into Hazel Dark

goto change_color_back

} elif (GREEN_EMERALD) {

@CHARACTER changes eyesColor into Green Emerald

goto change_color_back

} elif (BROWN_PALE) {

@CHARACTER changes eyesColor into Brown Pale

goto change_color_back

} elif (BROWN_LIGHT) {

@CHARACTER changes eyesColor into Brown Light

goto change_color_back

} elif (HAZEL) {

@CHARACTER changes eyesColor into Hazel

goto change_color_back

} elif (BLUE_AQUA) {

@CHARACTER changes eyesColor into Blue Aqua

goto change_color_back

} elif (BLUE_DEEP) {

@CHARACTER changes eyesColor into Blue Deep

goto change_color_back

} elif (BLUE_GREEN) {

@CHARACTER changes eyesColor into Blue Green

goto change_color_back

} elif (ICE_BLUE) {

@CHARACTER changes eyesColor into Ice Blue

goto change_color_back

}

label change_color_back

I know you asked Dara, but you can also use the previews / Unpreviews command

if you use that one, you can change color eyes. (Example) and when you use unpreviews it goes to what the reader has chosen :smile:

1 Like

Thank you girl! :pleading_face: :heart:

1 Like

What is under is my exact diologe, but whenever I click the choice coffee it takes me to the orange option? Why?

    IMOGEN
What do I want to drink?

choice
“Orange Juice” {
gain orange_juice

} “Coffee” {
gain coffee

} “Water” {
gain water
}

if (orange_juice) {
IMOGEN
Orange

} elif (coffee) {
IMOGEN
Coffee

} else {
IMOGEN
Water
}

@Dara.Amarie How?! if i put a Choice using this Codes
How Does the choice that the reader chose on episode 1 will have an impact on episode 2 :thinking::heart:

Do gains cross-over to future episodes?

Yes

Hey i have a question. I already did the if/elif/else and gains, my question is what code am i going to write in the new episode if i want to change my characters outfit by the past choices she pick? new writer here hehe. please help me