Help with else if + gains

Hi!! I’m having an issue with else if and gains…I fixed this problem before but I’ve forgotten how to!! :sob: This is what happens when you take a 6 month hiatus from Episode coding…

here’s the 411 - Currently making a Horror Survival story with choices that impact your ending - you can either choose to be a pacifist or go absolutely buck wild. When you pick certain choices you’ll ‘gain’ a certain thing that will let you view the story from another angle in comparison to what other people would see.

The issue I’m having is I’ll run into a choice, both options will have two different gains, and later on in the story the two gains will be coded into else ifs and it will show you different scenes depending on the label you gained. But I’m viewing scenes I shouldn’t able to view because I didn’t ‘gain’ the requirement, but for some reason, Episode’s still showing me the scene. (I don’t have any Script errors or warnings so I can still view the Preview).

Here’s the choice:

choice [timed: 7] “KILL HIM” {
@reset hsl

sound heartbeat

@add Knife Metal to TAI

    TAI (talk_armscrossed_neutral_loop)
It's a shame...
You're such a handsome man, Papa...

gain killhim

@TAI is idle_armscrossed_neutral_loop

    TAI (talk_whisper_worried)
I think you're missing something...

@zoom on 176 401 to 233% in 20
@TAI is shove_argument_give_angry
&RYAN is shove_argument_receive_angry

@transition fade in red

@TAI is stab_knife_overhand_angry_start

@RYAN is react_shocked_gasp

@TAI is stab_knife_overhand_angry_end

@RYAN is faint

**} “SPARE HIM” {
@reset hsl
gain sparehim

@transition fade in white

@TAI changes eyesColor into Hazel Dark

    TAI (cry_sob_sad_loop)
I'm so glad you're here...

@RYAN is hug_neutral_rear

I was able to resist....
I was able to..resist...
I'm so happy I spared someone...

Are you sure you're alright?
You look like you've seen a ghost!

How did you get here...?
I told you before! It's not safe here!
I was worried....
I care about you...

We should leave...
If we stay here any longer, who knows what will happen...


This is the whole part that plays when I pick SPARE HIM.

if (killhim) {
@TAI enters from left to screen center
@TAI changes eyesColor into Hazel Dark
@TAI is idle_knife_angry_loop

(I can feel someone following me..)

sound ambient_dripping_lp

@TAI faces left

    TAI (talk_knife_angry)
Who's there? Reveal yourself!

@DARK2 stands screen center in zone 2

It's me...Ni..

@pan to zone 2

@cut to zone 1

gain homiecide

    TAI (talk_knife_threaten_angry)
How dare you?! I know she's dead!

    TAI (talk_knife_angry)
Are you playing some sick joke?!

This is the part that SHOULD play.

} else {

@TAI enters from right to screen center
@RYAN enters from right to screen left

    RYAN (talk_pointup_happy)
The door is over there!

@TAI walks to screen right
@TAI is tinker_stand_neutral_loop_rear


sound door_knock

It's jammed...

    RYAN (talk_afraid)
Need any help?

I can't seem to open the door...
I mean, I can turn the knob, but...
It's not...pushing...

sound scream_female_warped

@RYAN is react_shocked_gasp

What was that?!

@TAI is react_mortified

(We have to be careful!)

I want to point out that when I play the story the alternate way (When I choose to kill Ryan instead of spare him) the issue with the labels doesn’t happen, it only happens when I spare Ryan.

Can someone please help???


Are you using mobile or desktop preview?
You need to “ungain” things in helper menu, or restart story progress, when you’re previewing this kind of scenes. :wink:

i am such a dunce. i amaze myself sometimes. all i needed to do was reload my tab to ungain things.
Tysm for pointing this out. I hope not to make this mistake again.

1 Like

Hah, dw, I did this so many times, as well :smile_cat: Glad I could help somehow :heart:

Closed: Marked as solved by thread op :v: