Trouble with remembering past choices

Hey, I’m new to creating stories and have been browsing the forums for help with any issues, but I can’t seem to fix this problem.
I created a dressing game with 4 choices and in a later scene, I needed to remember what choice was chosen. I have used the if, elif and else and no errors show but when I do a rerun of my story, it always changes the character to the last outfit choice I’ve added. Here is the code I have used for the dressing game and the later code for remembering:

label dressinggame
speechbubble reset
CRYSTAL (think)
(I’d like to wear…)
choice (PJ1)
“Cupcake Mania”{
CRYSTAL previews outfit PJ1
CRYSTAL is curtsey
pause for a beat
CRYSTAL starts idle
CRYSTAL (idle_arms_crossed)
(This is so sweet!)
choice
“Wear this!” {
CRYSTAL changes into PJ1
gain PJ1
goto afterdg1
} “I’ll try something else.” {
CRYSTAL unpreviews outfit PJ1
goto dressinggame
}}“Pinky Power”{
CRYSTAL previews outfit PJ2
CRYSTAL is curtsey
pause for a beat
CRYSTAL (idle_arms_crossed)
(We are talking major pinky power!)
choice
“Wear this!” {
CRYSTAL changes into PJ2
gain PJ2
goto afterdg1
}“I’ll try something else”{
CRYSTAL unpreviews outfit PJ2
CRYSTAL starts idle_arms_crossed
goto dressinggame
}}“Mesh Leopard”{
CRYSTAL previews outfit PJ3
CRYSTAL is curtsey
pause for a beat
CRYSTAL starts idle
CRYSTAL (idle_arms_crossed)
(I feel as fierce as a leopard!)
choice
“Wear this!” {
CRYSTAL changes into PJ3
gain PJ3
goto afterdg1
}“I’ll try something else.”{
CRYSTAL unpreviews outfit PJ3
CRYSTAL starts idle_arms_crossed
goto dressinggame
}}“Wild in White”{
CRYSTAL previews outfit PJ4
CRYSTAL is curtsey
pause for a beat
CRYSTAL (idle_arms_crossed)
(I feel wickedly wild in white!)
choice
“Wear this!” {
CRYSTAL changes into PJ4
gain PJ4
goto afterdg1
}“I’ll try something else”{
CRYSTAL unpreviews outfit PJ4
goto dressinggame
}}
label afterdg1
CRYSTAL starts idle_happy

And here is the code for remembering the choice:

if (dressinggame is “Cupcake Mania”) {
CRYSTAL changes into PJ1
} elif (dressinggame is “Pinky Power”) {
CRYSTAL changes into PJ2
} elif (dressinggame is “Mesh Leopard”) {
CRYSTAL changes into PJ3
} else {
CRYSTAL changes into PJ4
}

I’ve had to remove all the @ as it thought I was tagging users, and it tells me I can’t tag more than 2 users at a time. But they are all in place as they should be in the script.
Any help really is greatly appreciated, it is driving me nuts!

You’re if/elif/else is not the correct format. Take a look at this guide: HOW TO: Remember Past Choices (if/elif/else)

@Dara.Amarie I have changed it but it still isn’t working. Would you mind telling me if this is right and if not, what needs changing:

if (“CRYSTAL_PJ1”) {
@CRYSTAL changes into CRYSTAL_PJ1
} elif (“CRYSTAL_PJ2”) {
@CRYSTAL changes into CRYSTAL_PJ2
} elif (“CRYSTAL_PJ3”) {
@CRYSTAL changes into CRYSTAL_PJ3
} else {
@CRYSTAL changes into CRYSTAL_PJ4
}

Thank you for your replies!

Your gain names should be inside the parentheses only, no quotes.

@Dara.Amarie You are a superstar! Thank you so much, I really appreciate it! God help me when I need to start adding more to a remembered choice, though :stuck_out_tongue:

1 Like

Hello @bekki.episode! This is Sydney the Moderator and we welcome you to the Episode Forum! Take a second to check out our excellent Forum Tutorial for some neat tips about where to correctly create topics. Since this topic includes scripting, I have moved it from Creator’s Corner into Directing Helps and Tips. :wink:

Thanks for reading and have a good day! :sunglasses:

Hello. I am new in Episode community and pretty new in writing as well. Now, I’ve reached the point where I want my readers to pick meaningful choices. I gave them two choices, and the second one, if clicked, gives them two choices on which they choose to act. I’ve done a gain option on those three. “Don’t escape”, “Escape through door” and “Escape through window”. Then when I’m previewing and when I choose one of “Escape” options, the story goes as if I chose the “Don’t escape” option. And I’ve placed if for the first option and elif for other two, but it just doesn’t work. I checked to see if I misspelled gains, but I didn’t. I even did copy-paste just to make sure. But I still comes out that way… Does anyone know what I did wrong?

The last option should be else without anything in it.

if (condition) {

} elif(condition) {

}else {

}

I didn’t put else anywhere, because I don’t need it. It goes well with the first choice, but with other two it messes up.

That how it’s working, you have a 3 choices so for the first option is if for the second is elif for the third is else

Lol, you don’t understand me. I’ve gained three choices, due to which I can’t have else in there, and I’m not colliding two choices together. And else goes without any condition. But I want my story to go based on those three remembered choices.

You have to have ‘else’ or the third choice won’t work.

Oh my :smiley: I’m sorry :smiley:

if (gain1 and gain2 and gain3) }

} else {

}

you still need an else even if it’s nothing in it

1 Like

After all of them or for one in there? I’m sorry, I’m new to this and stupid.

Oh, that… Thank you soo much. It’s not your fault. I just don’t know how to explain my problem, lol

1 Like