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

So if I wanted the readers to choose the outfit I can’t?

You can. You just have to put that dressing game outside of the if/elif statement and put a goto inside the if/elif that leads to the label

1 Like

Thank you so much!! :grinning: But for future references, can you show me a short example?

1 Like

if (gain_name) {
goto dressing_game
}

label dressing_game

1 Like

Thank you!

Hi Dara.Amarie,
How to remember past choices was very helpful! I just can’t seem to figure out how to make it stay, for instance if I click on the line of script with the if/elif it works but if I go back it doesn’t or if I play the episode on my phone. I think I forgot something, but if you could help me I would be very grateful. Here are the lines of script:


There is a } at the end.
ekkdelkfewkfe
Thank you for your time!

1 Like

.

3 Likes

Thanks for the help and replying so quickly, but now I have a error. I tried following the picture exactly. Sorry I don’t mean to be annoying, I’m not used to scripting. Here’s the error:
ekwnwkw

Every starting bracket needs a matching ending bracket. Look at the example and look closely at all the brackets and where they should be placed.

You need a closing bracket on line 1231 to close off the “one piece” option and then another closing bracket on line 1219 to close off the “pink bikini” option. Then one more closing bracket at the very end that should close off the last option.

3 Likes

Thank you so much, you’re a lifesaver! I’ll been trying to figure out how to remember outfit choices for the last three days!

2 Likes

Hello,
Thank you Dara for all these explaination, it helped me a lot ! But I have a new problem :confused:
Could somobody help me with past choice, please ?
Basically, I did everything but with one of my friend we wonder what’s not working correctly.

Here is what I have :

In my chapter 4, there is this choice:

choice (dream_mystery)
“No, I respect her too much to do that !” {

NARRATOR (GREG)

I can’t risk to lose her trust.
gain trust

}
“Yes, it’s an important information and she’s hiding it on purpose…”{

NARRATOR (GREG)

I have to know everything if I want to protect her, right ?
gain information

}

In my chapter 6, I want to have two different situations at two different moments according to that previous choice:

if (trust) {

&GREG walks to spot 1.128 398 21 in zone 1 AND GREG faces right
NARRATOR (GREG)
Unbelievable…
@speechbubble reset
@transition fade out black in 1

} else {

JADE (talk_exhausted)

No… I don’t want to bother him with my worry…
@JADE exits right

@transition fade out black in 1

}

Then there is something like 500 lines, and then, here is the second consequence:

if (information) {

&GREG is disappointed
GREG
(Am I sure she isn’t a psychic ?)

NARRATOR (GREG)

Unbelievable…
@speechbubble reset

@transition fade out black in 1

} else {

&GREG is disappointed
MANON
(|bold|RUDE…)
@speechbubble reset

@transition fade out black in 1
}

The story plays correctly on my phone when I change the Flags. But for readers, none of both consequences are working…
If somebody could help me, it would means a lot <3 Thank you.

Sicy.

1 Like

It doesn’t allow me to place labels in if/else statements. I coded a scene on where you ask questions and get answers using choices if that makes sense. And I need the if/else because the scene is only available for those that chose to have a female love interest. Please help :frowning:

Hi everyone,

I’ve read the guides everyone has posted, but I just don’t get it :face_with_raised_eyebrow:

I’m trying to change outfits and have the outfit remembered in the next scene but I am lost and I feel like my head is going to explode.

Can anyone explain to me how this if/elif/else thing works for a dummy please please please?

Thanks in advance!!

Can someone help me with remembering choices, I have tried to do it several times but I always have the same issues… no matter what option I choose when proofing, it always does the else choice… so far this is what my script looks like:


Remove the quotes around sleep

1 Like

Omg… I tried it and it worked… I feel like an idiot! Thank you!!!:heart_eyes::grin:

1 Like

Hello,
I’m having a bit of a problem with my gain choices.
I’ve marked the gain flags with my choices and already had one scenario where I’ve used them. i want to use another
THIS IS WHERE I’VE PLACED MY GAIN FLAGS

   LILIAN
...
choice
"Be sympathetic"{
gain chose_sympathy
readerMessage Your relationship will be affected

 #scenario continues here


}
"Be indifferent"{
gain chose_indifference
readerMessage Your relationship will be affected

 #scenario continues here

}

THE FIRST SCENARIO WHERE I’VE USED THE IF/ELSE CHOICES
NICO
I’m on the way up! Gimme a minute!

if (chose_sympathy){
NICO
Come on, let’s head up.
#scenario continues

}elif (chose_indifference){
NICO
I should get going.
#scenario continues

}

In the next scenario, I want the consequence of the choice to continue, in a different area. If the reader chose to be sympathetic, the MC (LILIAN) and ‘NICO’ go outside together, and continue the story to a point that is common for both scenarios. If the reader chooses to be indifferent, LILIAN leaves by herself, and wishes to apologize to NICO and later the story converges to the common point.

_PROBLEM_
I've written this coding for the second scenario where the gain consequences are used:
INT. SHIP POOL - DAY
@cut to zone 3

if (chose_sympathy){
#the two go up together and to the common point previously mentioned. 

} else {
#LILIAN finds her friend and she goes to find NICO. 

}
INT. SHIP POOL - DAY
@cut to zone 3
if (chose_sympathy){
@LILIAN stands screen right AND LILIAN faces left
        LILIAN
 #scenario continues and then meets at the common point

} else {
@LILIAN stands screen right AND LILIAN faces left
        LILIAN
    (There he is...I hope he's not too mad.)

#LILIAN apologizes to NICO here and they meet at common point after branching with choices.

}

The problem is that when I preview the coding, even after choosing to ‘Be Indifferent’, the preview completely ignores the scenario coded for ‘chose_indifference’ and continues with the ‘chose_sympathy’ scenario.

Was there anything wrong with the coding? Is this a glitch? Is there some way to fix it? Please help!!

EDIT: I forgot to mention that when I save, NO ERROR shows up. It’s extremely infuriating. And yes, I haven’t add any animations yet, so I don’t have to worry about that yet. And I previewed it on my phone as well, BUT THIS DOES NOT HAPPEN. The flow and choices are all smooth and connecting, unlike the preview on the desktop writer portal.


If anything wasn’t understandable, please ask!
I really want to get this fixed before I can continue with the rest of this chapter. :sob:

Thanks :sparkling_heart:

1 Like

I am so confused! i followed every step and i still have an error on the last one! Here’s what i mean…
so i did-

choice
“Yes tell them”{

CHARACTER
Bla bla blah

gain Yes_tell_them

}

“No don’t tell them”{

CHARACTER
Blahhh blahh

gain No_don’t_tell_them

}

And then when i’m wanting to remember the players choice i did-

if (Yes_tell_them){

CHARACTER
Remember you told me you like chocolate.

}
else {
No_don’t_tell_them

CHARACTER
Blaah blahh

}

It always comes up as an error for the “else” one. I only have two choices to remember so i only used “if and else” i’m so confused and i was wondering if you could point out what i’m doing wrong?

1 Like

You do not need to write the gain name, it just needs to be } else { and that’s it.

You cannot have an apostrophe in a gain name. Remove it from “don’t”

1 Like

Ohhh that explain’s everything thank you so much it works :slight_smile:

1 Like