Label in if statement [solved!]


#1

Hello! I am creating my first story and I’ve ran into a problem. So I have a choice where my character can either change her outfit or keep the one she has on. If the reader decides to make her change, I wanted it to go to a dressing game, but I can’t put a label inside an if statement. Does anyone know how to do this?


#2

That’s correct, you can’t have labels inside the choices, put a goto label_name

you can also post your dressing game here and we will try to help you fix it :slight_smile:


#3

so i tried previously to do the goto, but since i already had another dressing game in my episode before i did “dressing_game_2” but it said that didn’t exist. but basically the part of my story looks like this;

} if (outfit_choice is “Change”) {

    ANDREYIA (breathe_deep)
Just help me pick a damn outfit.

    ALEENA (applaud_loop)
Time for you to look sexy!!

    DEVON (talk_primp_condescend)
What Aleena said.

@ALEENA is idle

label dressing_game_2

    ANDREYIA (talk_shrug)
What should I wear to the party?

choice
“Red Lace” {
@ANDREYIA changes into Red Lacey Dress
@ANDREYIA is blow_kiss

} “Sexy & Tan” {
@ANDREYIA changes into Party2
@ANDREYIA is strike_a_pose
}

    ANDREYIA (talk_think)
Do I want to wear this one?

choice
“Yes, you poppin.” {
@ANDREYIA is primp

} “No, this is ugly,” {
goto dressing_game_2
}
}


#4

you need to put goto inside the if and put the dressing game outside the choice, and make a label after it so the reader can go to story where both choices merge (put one in else as well)

if (outfit_choice is “Change”) {
#script
goto dressing_game_2
}

label dressing_game_2

ANDREYIA (talk_shrug)

What should I wear to the party?
choice
“Red Lace” {
@ANDREYIA changes into Red Lacey Dress
@ANDREYIA is blow_kiss

} “Sexy & Tan” {
@ANDREYIA changes into Party2
@ANDREYIA is strike_a_pose
}

    ANDREYIA (talk_think)
Do I want to wear this one?

choice
“Yes, you poppin.” {
@ANDREYIA is primp
goto story_merge

} “No, this is ugly,” {
goto dressing_game_2
}

label story_merge
@pause for a beat
#story merge here


#5

omg, thank you so much! this makes a lot more sense. i’ll try it out and reply back if it works.


#6

it worked, thank you!!!


#7

actually, sorry omg but where do i put the else part?


#8

do you have else part after if?


#9

no not currently


#10

if (outfit_choice is “Change”) {
#script
goto dressing_game_2
} else {
goto story_merge
}


#11

omg okay!!! thank you so much lol


#12

#13

Solved and closed. :wink:


#14