Trouble With if and else

I’m having trouble with the if and else commands, i’m trying to put in branching scenes but for some reason it keeps skipping the if section and go straight to the else section, I’ve tried everything and nothing i’m doing seems to be working

This is the original choice from Chapter 2:
choice (sophie)
“How old are you?” {
@SOPHIE starts deepbreath
@speechbubble is 189 203 to 100% with tail_top_right
ADRIAN (talk_think)
How old are you?
@ADRIAN starts talk_startled
@speechbubble is 167 187 to 100% with tail_top_left
SOPHIE (talk_happy_agree)
I just turned 20 in April!
@SOPHIE starts laugh_chuckle
@speechbubble is 189 203 to 100% with tail_top_right
ADRIAN (talk_mindblown)
You’re older than me!
@SOPHIE starts eyeroll
ADRIAN (talk_shrug)
I turn 20 in November!
@ADRIAN starts idle_awkward
@speechbubble is 167 187 to 100% with tail_top_left
SOPHIE (talk_doubtful)
Oh come on!
@ADRIAN starts idle_awkward
SOPHIE (talk_apathetic)
Just because I’m months older doesn’t mean that I’m better than you!
@SOPHIE starts laugh_giggle
@speechbubble is 189 203 to 100% with tail_top_right
ADRIAN (talk_sheepish)
I guess so!

} “Where are you from?” {
@SOPHIE starts think
@speechbubble is 189 203 to 100% with tail_top_right
ADRIAN (talk_think)
Where are you from?
@ADRIAN starts think
@speechbubble is 167 187 to 100% with tail_top_left
SOPHIE (talk_neutral)
I’m from Louisville, Kentucky!
@SOPHIE starts nod_loop
@speechbubble is 189 203 to 100% with tail_top_right
ADRIAN (talk_startled)
Kentucky?
@ADRIAN starts idle
@speechbubble is 167 187 to 100% with tail_top_left
SOPHIE (talk_happy_agree)
Yep!
@SOPHIE starts nod_loop
@speechbubble is 189 203 to 100% with tail_top_right
ADRIAN (talk_think)
Were you born and raised there?
@ADRIAN starts idle_happy
@speechbubble is 167 187 to 100% with tail_top_left
SOPHIE (flirt_fingersnap)
BINGO!

} “What are your parents like?” {
@SOPHIE starts deepbreath
@speechbubble is 189 203 to 100% with tail_top_right
ADRIAN (talk_neutral)
What are your parents like?
@ADRIAN starts talk_startled
@speechbubble is 167 187 to 100% with tail_top_left
SOPHIE (talk_sad_clutch)
Unfortunately I don’t know my parents well because they were killed in a car crash when I was just four years old
@SOPHIE starts deepbreath
@speechbubble is 189 203 to 100% with tail_top_right
ADRIAN (talk_awkward)
S**t I’m sorry to hear that…
@ADRIAN starts idle_sad
@speechbubble is 167 187 to 100% with tail_top_left
SOPHIE (talk_neutral)
That’s okay…
@ADRIAN starts think
SOPHIE (talk_gesture)
But how about I tell you about my uncle and aunt instead?
@SOPHIE starts idle_happy
@speechbubble is 189 203 to 100% with tail_top_right
ADRIAN (talk_happy_smile)
That’ll do!
@SOPHIE is deepbreath AND ADRIAN is arms_crossed
@speechbubble is 167 187 to 100% with tail_top_left
SOPHIE (talk_happy_agree)
My uncle is an construction worker
@ADRIAN starts admire
SOPHIE (talk_excited)
He’s working on a top million dollar project!
@SOPHIE starts idle_sad
@speechbubble is 189 203 to 100% with tail_top_right
ADRIAN (talk_excited)
What is it?
@ADRIAN starts talk_repulsed
@speechbubble is 167 187 to 100% with tail_top_left
SOPHIE (talk_shrug)
Unfortunately he can’t tell us nor anyone not associated with the company due to the owner wanting to keep it a secret until the day it opens
@SOPHIE starts idle_sad
@speechbubble is 189 203 to 100% with tail_top_right
ADRIAN (talk_arms_crossed)
Not even family!?
@ADRIAN starts arms_crossed_angry
@speechbubble is 167 187 to 100% with tail_top_left
SOPHIE (talk_sad)
Yep…
@ADRIAN starts arms_crossed
SOPHIE (talk_gesture)
As for my aunt she works as an magazine editor
SOPHIE (talk_excited)
She absolutely loves working there!
@SOPHIE starts idle_happy
@speechbubble is 189 203 to 100% with tail_top_right
ADRIAN (talk_think)
What’s the name of the magazine if you don’t mind me asking?
@ADRIAN starts write_notepad
@speechbubble is 167 187 to 100% with tail_top_left
SOPHIE (talk_neutral)
Femme Plus
SOPHIE (talk_gesture)
It’s a magazine for girls
@SOPHIE starts idle_happy
@speechbubble is 189 203 to 100% with tail_top_right
ADRIAN (talk_neutral)
I’ll keep an eye for it

} “What are your favourite hobbies?” {
@SOPHIE starts idle_happy
@speechbubble is 189 203 to 100% with tail_top_right
ADRIAN (talk_shrug)
Do you have any hobbies?
@ADRIAN starts think
@speechbubble is 167 187 to 100% with tail_top_left
SOPHIE (talk_think)
A few actually
@ADRIAN starts arms_crossed
SOPHIE (talk_gesture)
I’m a skilled artist, musician, ceramic and craft maker!
@SOPHIE starts idle_happy
@speechbubble is 189 203 to 100% with tail_top_right
ADRIAN (talk_think)
You like the arts don’t you?
@ADRIAN starts arms_crossed
@speechbubble is 167 187 to 100% with tail_top_left
SOPHIE (talk_happy_agree)
Oh yeah!
SOPHIE (talk_gesture)
It’s who I am!

} “Do you have any siblings?” {
@SOPHIE starts nod_loop
@speechbubble is 189 203 to 100% with tail_top_right
ADRIAN (talk_neutral)
You got any siblings?
@ADRIAN starts idle
@speechbubble is 167 187 to 100% with tail_top_left
SOPHIE (talk_neutral)
Yes I have 2 older siblings!
SOPHIE (talk_gesture)
Kayden my older brother is in the army
SOPHIE (talk_happy_smile)
And Xandra my older sister is a hairdresser in Boston…
@ADRIAN starts think
SOPHIE (talk_think)
What about you?
@SOPHIE starts idle
@speechbubble is 189 203 to 100% with tail_top_right
ADRIAN (talk_neutral)
I have an older brother named Michael
@ADRIAN starts arms_crossed
@speechbubble is 167 187 to 100% with tail_top_left
SOPHIE (talk_think)
That’s really cool!
}

Now i have put the “Do you have any siblings?” branch in other chapters and they work fine but this one “What are your parents like?” doesn’t seem to be working

Here’s what’s supposed to happen
if (sophie is “What are your parents like?”) {
@zoom on 382 358 to 288% in 0
@ADRIAN spot 1.001 108 111 in zone 2
@speechbubble is 176 136 to 128% with tail_top_left
ADRIAN (talk_gesture)
Yeah Sophie told me about it
ADRIAN (talk_happy_agree)
I actually found out my brother’s girlfriend reads them
@ADRIAN starts talk_arms_crossed
&zoom on 379 568 to 291% in 3
@transition fade out white 3

EXT. WHITE
&zoom reset

FILTER: Luminance

@set hsl -14 70 21 colorize with blendMode Normal to 76%

Your filter will be enabled for every scene after this line

To turn off the filter, use “@reset hsl” or “@reset hsl in [# of seconds]”

INT. LA APARTMENT - NIGHT with TABLE SIMPLE to 1.486 258 -49 in zone 2
readerMessage You’ve unlocked a bonus scene
music music_bbb_everydaygroove
&cut to zone 3
@BRIANNA changes into BRIANNA_pyjamas
&BRIANNA spot 1.320 245 -67 in zone 3
&BRIANNA moves to layer 0
&BRIANNA faces left
&BRIANNA is idle_read_book
@transition fade in white 3
@pause for a beat
@cut to zone 1
sound door_close
@ADRIAN changes into ADRIAN_winter
@ADRIAN spot 1.275 -95 -12 in zone 1
@ADRIAN moves to layer 2
@ADRIAN walks to spot 1.275 169 -1 in zone 1 in 3 AND ADRIAN faces right AND ADRIAN does it while walk_exhausted
@ADRIAN faces right
@ADRIAN is yawn_bored
@ADRIAN is think
@speechbubble is 203 251 to 115% with tail_top_left
ADRIAN (talk_neutral)
Hey Bri what are you reading?
@cut to zone 3
@BRIANNA is think
@speechbubble is 141 205 to 115% with tail_top_right
BRIANNA (talk_greet)
Oh hey Adrian
BRIANNA (talk_suggest)
I’m reading this magazine for girls
BRIANNA (talk_airquotes)
It’s called “Femme Plus”
@cut to zone 1
@ADRIAN is think_loop
@speechbubble is 203 251 to 115% with tail_top_left
ADRIAN
(Femme Plus?)
ADRIAN (talk_gesture)
Can I tell you something?
@cut to zone 3
@speechbubble is 141 205 to 115% with tail_top_right
BRIANNA (talk_arms_crossed)
Sure
@cut to zone 1
@speechbubble is 203 251 to 115% with tail_top_left
ADRIAN (talk_suggest)
You know my friend Sophie?
@cut to zone 3
@speechbubble is 141 205 to 115% with tail_top_right
BRIANNA (talk_neutral)
Of course
@cut to zone 1
@ADRIAN is deepbreath
@speechbubble is 203 251 to 115% with tail_top_left
ADRIAN (talk_gossip)
Her aunt is the editor of Femme Plus
music off
@cut to zone 3
sound glass_shatter
@BRIANNA is idle_jawdrop
sound scream_female
@speechbubble is 141 205 to 115% with tail_top_right
BRIANNA (scream)
| bold | GET OUT!
music music_mischief
BRIANNA (talk_mindblown)
| bold | YOU SERIOUS!!!
@BRIANNA is deepbreath
BRIANNA (talk_excited)
Tamara Smith is Sophie’s aunt!?
@cut to zone 1
@BRIANNA starts flirt_fingersnap
@speechbubble is 203 251 to 115% with tail_top_left
ADRIAN (talk_awkward)
Is she famous?
@cut to zone 3
@pause for a beat
@speechbubble is 141 205 to 115% with tail_top_right
BRIANNA (talk_mindblown)
Are you kidding me!?
BRIANNA (talk_exclaim_yes)
Her articles is to die for!
@cut to zone 1
@BRIANNA moves to layer 3
@ADRIAN starts talk_neutral_deny
@BRIANNA walks to spot 1.320 251 -24 in zone 1 in 1 AND BRIANNA faces left AND BRIANNA does it while run_athletic
@zoom on 156 328 to 221% in 0
@BRIANNA spot 1.320 193 -19 in zone 1
@BRIANNA faces right
@ADRIAN is mortified AND BRIANNA is hug_rear
@speechbubble is 140 201 to 142% with tail_top_right
BRIANNA
Adrian
If Sophie ever asks you to meet her
Can you please give me an autograph of her!
@ADRIAN is deepbreath
@speechbubble is 150 234 to 142% with tail_top_right
ADRIAN (talk_neutral)
I will
@ADRIAN starts hug
&zoom on 153 568 to 221% in 3
@transition fade out white 3

EXT. WHITE
@reset hsl

INT. OFFICECURT - DAY
&cut to zone 2
&zoom on 382 358 to 288% in 0
&overlay DESK - DAY create
&overlay DESK - DAY shifts to -9 -49 in zone 1
&overlay DESK - DAY scales to 1.108 1.108
&overlay DESK - DAY moves to layer 1
&overlay DESK - DAY opacity 1
&overlay COMPUTER CHAIR - ROSE GOLD create
&overlay COMPUTER CHAIR - ROSE GOLD shifts to 47 74 in zone 1
&overlay COMPUTER CHAIR - ROSE GOLD scales to 1.324 1.324 in zone 1
&overlay COMPUTER CHAIR - ROSE GOLD moves to layer 2
&overlay COMPUTER CHAIR - ROSE GOLD opacity 1
@TAMARA changes into TAMARA_default
&TAMARA spot 0.812 281 238 in zone 2
&TAMARA moves to layer 0
&TAMARA faces left
@ADRIAN changes into ADRIAN_smacker
&ADRIAN spot 1.001 108 111 in zone 2
&ADRIAN moves to layer 3
&ADRIAN faces right
&ADRIAN is think
@transition fade in white 3
@speechbubble is 176 136 to 128% with tail_top_left
ADRIAN (talk_sheepish)
Actually before we start the interview can I have your autograph?
@zoom on 640 400 to 307% in 0
@TAMARA is think
@speechbubble is 157 190 to 141% with tail_top_right
TAMARA (talk_handsonhips)
Is it for your brother’s girlfriend?
@zoom on 382 358 to 288% in 0
@speechbubble is 176 136 to 128% with tail_top_left
ADRIAN (laugh_chuckle)
You read my mind
@zoom on 640 400 to 307% in 0
@speechbubble is 157 190 to 141% with tail_top_right
TAMARA (talk_neutral)
Sure
@TAMARA is write_notepad
@TAMARA is take_item_grateful
@zoom on 382 358 to 288% in 0
@ADRIAN starts talk_read_paper
TAMARA
Hopefully this will make her happy
@speechbubble is 176 136 to 128% with tail_top_left
ADRIAN (talk_happy_smile)
Thank you

} else {
@zoom on 382 358 to 288% in 0
@ADRIAN spot 1.001 108 111 in zone 2
@speechbubble is 176 136 to 128% with tail_top_left
ADRIAN (talk_shrug)
Um no
@zoom on 640 400 to 307% in 0
@TAMARA is think
@speechbubble is 157 190 to 141% with tail_top_right
TAMARA (talk_gesture)
Well I’ll explain anyway
TAMARA (talk_arms_crossed)
Femme Plus is a magazine especially for girls
TAMARA (talk_suggest)
The aim is to give girls advice
TAMARA (talk_contend)
For example not to be self-conscious about your appearance
TAMARA (talk_gossip)
And how it’s okay to be yourself
@zoom on 382 358 to 288% in 0
@speechbubble is 176 136 to 128% with tail_top_left
ADRIAN (talk_sheepish)
Wow…
}

But it goes straight to the else section

And here’s another part
if (sophie is “What are your parents like?”) {
readerMessage You unlocked a bonus scene
@speechbubble is 176 263 to 109% with tail_top_left
ADRIAN (talk_flirt)
And as promised I’ve gotten Tamara’s autograph
@BRIANNA is admire
@speechbubble is 203 263 to 109% with tail_top_left
BRIANNA (talk_excited)
OH THANK YOU THANK YOU THANK YOU!!!
@speechbubble is 176 263 to 109% with tail_top_left
ADRIAN (talk_happy_smile)
It was my pleasure
}

Similar to the first one the script completely skips the if section

Can anyone help me figure out what i’m doing wrong?

I have tested it and it worked.
So I assume that it might be just problem that you test it in the portal.

If the choice and if/else is in the same chapter refresh the page (so it will delete from memory all choices)
And try it again and pick up the “What are your parents like?”

If it is in another chapter then the reason is that the portal is not able to remember choices from the previous chapter (comparing to the app)
So you have to simulate the choice by changing the flags in story modifiers.

1 Like

I should probably mention that it’s the app that I’m having trouble with not the writers portal

Also the If and else are in a different chapter, this choice was implemented in Chapter 2, I have put the siblings branch in Chapter 4 and 7 and they both work but when I put the parents branch in the current chapter it completely skips it and this is the first time I’ve put said branch in

Another thing i should mention too is that the only way i could make it work is if i enable the picker

This is really tricky to fix

well as I said I have tested it and it worked for me so I do not see mistake in the script.:thinking::thinking::thinking:

Then it might be a glitch because when I test it out it always skips the if section

I might have to put a choice in at the beginning

you said you switched on the picker. Did it show then both options? Like this?

Yes, that was the only time I could see the if choice

well Try to triple check if you have the name of the choice in the bracket exactly as it is in the choice (better copy it there)

Because the only reason why it might not work (except if it is not a bug) is if there is a difference like a typo. Then the script cant recognize the choice.

Therefore I do not use named choices but gains because they can be much shorter so less likely to got it wrong…

Ok so this is what I wrote:

Chapter 2:

Chapter 17:

I believe there might be typo right under the “if” in the readersMessage you miss s

Is it where the reader unlocked the bonus scene?

yes

Odd I don’t see any typo

I am now really not sure about it if it should be

readerMessage or
readersMessage

um sorry you have it right my mistake

well honestly in this moment I can only reccomand you to contact support via ticket. Maybe they might find out why it is not working?

I’ll try to put a choice at the beginning and if not then I’ll think about calling support

Everything’s working now, i put a choice at the beginning and all branching scenes now work

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.