Using if/elif/else to Remember Past Choices

#397

thanks it worked.

#398

Hey,

I have a theoretical question.
If I use “The choice name and option method” in the current episode, can I refer back to that choice in later episodes?

For eg. MC is in a situation with a boy where she must choose between being affectionate or being cold to him. If she chooses to be affectionate, and that means she invites him to a party, if she chooses to be cold, the boy will still go to that party, but someone else invites him.
The party scene will happen in a later episode.
If I label this choice, then can I refer back to it in that later episode?

So my code would look something like this:

In the current episode:

choice (situation)
“Affectionate” {
blablabla

} “Cold” {
blablabla

}

In the party episode:

if (situation is “Affectionate”) {

GIRL
Hey, I’m glad you are here!
blablabla

} else {

GIRL
How come you are here?
blablabla
}

#399

Yep, you’re good.

1 Like
#400

Thanks for your answer. :slight_smile:

1 Like
#401

:heart:

1 Like
#402

@Dara.Amarie

please help, my script says i have no errors but when i play the episode it wont remember what i chose from last episode.

what am i doing wrong?

MY REMEMBERED SCRIPT:

if (Outfit1){
@AMARA changes into AMARA_blackandbeige party
}else (Outfit1){
@AMARA changes into AMARA_revealing in red
}

if (Hair1){
@AMARA previews hair Straight
}elif (Hair1){
@AMARA previews hair Diva Curls
}else (Hair1){
@AMARA previews hair Beach Wave Hair
}

if (Lipcolour1){
@AMARA previews mouthColor Bubblegum Pink
}elif (Lipcolour1){
@AMARA previews mouthColor Scarlet
}else (Lipcolour1){
@AMARA previews mouthColor Ruby Red
}

MY DRESSING GAME:

label choosing_outfit

    AMARA (think)
What outfit do i want to wear?

choice “Black&beige”{
@AMARA walks to spot 1.190 -126 2
@pause for a beat
@AMARA changes into AMARA_blackandbeige party
@zoom on 687 0 to 235% in 0
@AMARA walks to spot 1.190 82 15
@zoom on 667 275 to 235% in 3
@zoom reset
gain Outfit1
}
“Revealing in red”{
@AMARA walks to spot 1.190 -126 2
@pause for a beat
@AMARA changes into AMARA_revealing in red
@zoom on 687 0 to 235% in 0
@AMARA walks to spot 1.190 82 15
@zoom on 667 275 to 235% in 3
@zoom reset
gain Outfit2
}
AMARA (think)
(Do i want to wear this?)

choice “yes i look hot af”{

    KARINA (talk_handsonhips)
Guys are gonna be all over you!

&AMARA is laugh_chuckle
@KARINA is laugh_chuckle

}“Try something else”{

    AMARA (think)
(I'll try something else)

@pause for a beat

goto choosing_outfit

}
AMARA (talk_gossip)
I need to do my hair and makeup

label choosing_hairstyle

    AMARA (think)
(What hairstyle do i want?)

choice “Straight”{

@zoom on 673 315 to 256% in 0
@AMARA is primp_brush_hair
@pause for a beat
@AMARA previews hair Straight
@pause for a beat
@AMARA is idle_happy
gain Hair1
}
“Curly”{

@zoom on 673 315 to 256% in 0
@AMARA is primp_brush_hair
@pause for a beat
@AMARA previews hair Diva Curls
@pause for a beat
@AMARA is idle_happy
gain Hair2
}
“Beach wave”{

@zoom on 673 315 to 256% in 0
@AMARA is primp_brush_hair
@pause for a beat
@AMARA previews hair Beach Wave Hair
@pause for a beat
@AMARA is idle_happy
gain Hair3
}
@zoom reset

    AMARA (think)
Do i want this hairstyle?

choice “Yes!”{

    AMARA (idle_happy)
(I love this hairstyle)

    AMARA
(Now my makeup)

}“try a different hairstyle”{

@pause for a beat

goto choosing_hairstyle

}

label choosing_lipcolour

    AMARA (think)
What lip colour do i want?

choice “Bubblegum pink”{

@zoom on 673 315 to 256% in 0
@add Lipstick to AMARA
&AMARA is apply_lipstick
@pause for a beat
@AMARA previews mouthColor Bubblegum Pink
@remove Lipstick from AMARA
@AMARA is idle_happy
gain Lipcolour1
}
“Scarlet”{

@zoom on 673 315 to 256% in 0
@add Lipstick to AMARA
&AMARA is apply_lipstick
@pause for a beat
@AMARA previews mouthColor Scarlet
@remove Lipstick from AMARA
@AMARA is idle_happy
gain Lipcolour2
}
“Ruby red”{

@zoom on 673 315 to 256% in 0
@add Lipstick to AMARA
&AMARA is apply_lipstick
@pause for a beat
@AMARA previews mouthColor Ruby Red
@remove Lipstick from AMARA
@AMARA is idle_happy
gain Lipcolour3
}
@zoom reset

    AMARA (think)
Do i want this colour?

choice “yes”{

    AMARA (talk_think)
What do you think?

    KARINA (talk_excited)
You look stunning!

@AMARA is primp

}“Let’s see what other options there are”{

goto choosing_lipcolour

}

#403

else needs to be on its own, delete the gains from it, also you use the same gains for each option?

in your dressing/hair/lipstick game you need to confirm each choice, check HERE for a template

#404

thankyouuuuu

#405

I never figured the difference between if/elif, but I always put if, like:
if (1){
}
if (2){
}

And it seem to be working. Or there might be problems with this approach?

#406

Is it possible for the chapters to remember past choices that lead to different events? Like say, if the player tells this character to go one way, then that character gets injured, but if the player tells this character to go another way, then that character would be completely fine? Like instead of choices about outfits, it’s about choices regarding the events of a story?
If so, I’ve been trying to do do the whole gain thing, or the naming the choice and doing if (choice is this), but nothing seems to be working when trying to get the next chapter to remember the past choices. No matter what, the preview just stops before the if(gain) part and won’t continue. Can someone help me?



also, every time I preview the story and the thing skips over the if parts, the coding part under the preview always goes “expr (text) == 0”. What does that mean?

How to create locked choices?
#408

Hi. So, I’m not sure about what I’ve done wrong since there are no errors/warnings. So, this is my script:

INT. GRAND ENTRY HALL - NIGHT

@pause for 7

@transition fade out black

INT. DELTA HOUSE MEETING ROOM - NIGHT with ARMCHAIR to 0.713 14 98 at layer 0

if (chose_angie){

@zoom on 257 284 to 407% in 2

@ARIA changes into ARIA 3

@ARIA faces left

@ARIA spot 0.503 232 337 and ARIA is idle_sit_armcrossed_unimpressed_loop
}

And for some reason when I try to preview it, it’s just stuck on the first background, like, it shows the transition but then it just goes back to the first background. However, when I remove the if (chose_angie) and the { and }, it appears. Any help please? :slightly_frowning_face:

#409

Do you have to use gains to remember what the readers chose in character customization if you want the customization to stay the same after chapter 1 ?

#410

No, you don’t. If a reader chooses something like blush lipstick, it’ll be on them for every episode until they change it (which they have the option to do so only if you put into your script the options for choosing something)

Don’t use gains for CC templates BTW, it won’t work.

#411

*My script keeps going to the first outcome, no matter what i do.
*I always get errors if i use } else {

Helpppp.

#412

“else” needs to be by itself with nothing next to it

} else {

#413

So just on a separate line?
Also will that fix the issue of the outcomes too?

#414

I have got a question, when we put our if and else choice how do we actually use it in the next chapter?

#415

It carries over throughout every episode in your story. Once you gain something/have a choice remembered, it is remembered for every episode so you can use the if, elif, else statement in any episode whenever you need to and however many times you want to.

Just remember if you want to test out different paths to see if your story is working, reset your gains (flags) and select other options to see their outcomes.

#416

so, we don’t have to write the commands each episode?

#417

Yes, you do.

If you want to reference it, you have to write it. But it’ll remember what your reader chose as long as you script it right.

(Sorry to jump in, Jem <3)

1 Like