🖤 HOW TO: Labels and Gotos 🖤

Bump :chef:

FF: I learned how labels and gotos work after creating my own CC template :joy:

Bump :metal2: :v: :black_heart: :metal: :black_joker:

1 Like

Bump! :blob_sun:

Remember guys you cannot have a customization template inside of if/elif/else and choices. It has to be outside of them. This is because labels aren’t allowed inside of if/elif/else and choices and a CC template is full of labels.

Some examples below:

Incorrect:

NARR
Who would you like to customize?

choice
“Jem”{
#CC template for Jem
}“Brandi”{
#CC template for Brandi
}“Done”{
NARR
Very well, let’s move on!
}
#continue (incorrectly coded) story

How to fix this, correct:

label friends

NARR
Who would you like to customize?

choice
“Jem”{
goto gem
}“Brandi”{
goto flower
}“Done”{
goto finish
}

label gem
#CC template for Jem
goto friends

label flower
#CC template for Brandi
goto friends

label finish
NARR
Very well, let’s move on!
#continue (correctly coded) story

Same applies to if/elif/else.

Incorrect:

if (HERO){
#CC template for Jem
}else{
#CC template for Brandi
}

Correct:

if (HERO){
goto gem
}else{
goto flower
}

label gem
#CC template for Jem
goto storyline

label flower
#CC template for Brandi
goto storyline

label storyline
#continue story

…So yeah, just remember that labels cannot go inside of choices and if/elif/else statements but luckily gotos can!

1 Like

Bump. :penguin:

1 Like

Can also be written like:

goto label friend

The command redo exists as well.

Ex.
redo friend

The difference between a redo and a goto:

You can write a full storyline under a label.

I’d recommend this if the full story-lines are EXTREMELY different (ex. a guy love option path under one label and a girl love option path under a different label) Regardless, you’ll need a goto at the end of the storyline that takes the reader to a label it shares the same name with, so they can read through the ending credits. Forgetting to do this means the reader will read through the other path as well which is something you don’t want (a big no-no).

You can write both of the scenes under separate labels. If the story-lines for both girls are very different, then yes, I’d recommend to write the whole story-line under that label.

Ex.

#choice that decides what path you want to play as if you’re on the first episode. If episodes 2 and up, if/elif/else method can be used to lead to a path.

label no_shower
#whole story line here for girl who went to work without showering
goto end

label drunk_ok
#whole story-line here for girl who got so drunk and ends up in jail
goto end

label end
#ending credits

But if the storyline is about the same girl and based on a decision the reader picks, you can just use labels to show the actions of what they selected and then merge back to the main storyline.

#there would be coding above here, leading to the separate paths.

label no_shower
#scene for girl going to work without showering. Doesn’t take up full episode and once it’s over:

goto merge

label drunk_ok
#scene here for girl who got so drunk and ends up in jail, doesn’t take up full episode and once it’s over:

goto merge

label merge
#story-line is back to main

I believe this is what you mean, hope it’s understandable :blob_hearts:

2 Likes

Thank you! I accidentally deleted the post as I was trying to edit it :joy::two_hearts:

1 Like

:joy: haha, i love you so much :yay: :kissing_heart: :blob_hearts:

1 Like

Bump :blue_heart:

1 Like

:green_heart: Bump :heart:

Bump :cookie:

Bump :two_hearts:

1 Like

Bump :blob_turtle:

1 Like

This thread and the help of the amazing Jem has shaped me into a better coder :blob_hearts:

1 Like

Thank you :pleading_face: :sunglasses: ilysm mon amie :avocado_love: :blob_hearts:

1 Like

choice
“Did you miss London?”{
@speechbubble is 172 230 to 87% with tail_bottom_right
NOELLE (talk_neutral)
Do you miss London?
@speechbubble is 174 255 to 83% with tail_bottom_left
CASPER (talk_sheepish_rubneck)
I get homesick sometimes but I don’t wanna be there anymore.
And I was tired of being stuck in London.

@speechbubble is 174 255 to 83% with tail_bottom_left
CASPER (talk_handraised_happy_loop)
I love the city I was raised in, But
I wanna to explore something different.

@NOELLE is breathe_deep
@speechbubble is 172 230 to 87% with tail_bottom_right
NOELLE (talk_sheepish_rubneck)
Would you moved back to London?

@CASPER is think_rubchin
@speechbubble is 174 255 to 83% with tail_bottom_left
CASPER (talk_unsure)
Honestly, No I like it here.
I have a lot of freedom and I can do whatever I want.

@speechbubble is 174 255 to 83% with tail_bottom_left
CASPER (talk_sad)
(I do wish my family could come here.)

goto questions

@NOELLE is listen_nod_happy_loop

} “Do you like California?” {
@speechbubble is 172 230 to 87% with tail_bottom_right
NOELLE (talk_think_neutral)
Do you like California?

@speechbubble is 174 255 to 83% with tail_bottom_left
CASPER (talk_smile_happy_loop)
Of course.

@speechbubble is 174 255 to 83% with tail_bottom_left
CASPER (talk_think_neutral)
What about you?

@speechbubble is 172 230 to 87% with tail_bottom_right
NOELLE (talk_neutral_loop)
I have been a california girl my whole life.

goto questions
} “Do you have any silbing?” {

@speechbubble is 172 230 to 87% with tail_bottom_right
NOELLE (talk_armscrossed_neutral_loop)
Do you have any silbing?

@speechbubble is 174 255 to 83% with tail_bottom_left
CASPER (talk_neutral)
Nope, I’m the only child you?

@speechbubble is 172 230 to 87% with tail_bottom_right
NOELLE (talk_handraised_happy_loop)
Yes, I have a 10 year old sister and I live with my Dad.

@speechbubble is 174 255 to 83% with tail_bottom_left
CASPER (talk_whisper_worried)
My parents couldn’t come to American.

@speechbubble is 172 230 to 87% with tail_bottom_right
NOELLE (talk_awkward_loop)
Oh, how come?

@speechbubble is 174 255 to 83% with tail_bottom_left
CASPER (talk_sad_exhausted)
Their taking care of my grandma she recently had a stoke.
( I hope she can recover very soon.)

@speechbubble is 172 230 to 87% with tail_bottom_right
NOELLE (talk_sad)
I’m so sorry.
I hope she gets better very soon.

@speechbubble is 174 255 to 83% with tail_bottom_left
CASPER (talk_sheepish_rubneck)
Thank you.

goto questions

}“Your a singerwriter?”{

    NOELLE (talk_neutral_loop)
   So, your a singerwriter?

    CASPER (talk_handsonhips_neutral)

Yes, I write many different songs.

    CASPER (talk_awkward_loop)

But I never shared them with nobody.

    NOELLE (talk_think_neutral)
 Why come?
 
    CASPER (talk_awkward_loop)
 I am in embarrassed.
 And scared what other people will think of me.
 
    CASPER (talk_awkward_loop)
 (When it comes to singing of course.)

goto questions
{

    CASPER (talk_handraised_happy_loop)
   I had a amazing spend with you.

choice
“Done with questions”{

    NOELLE (talk_handsonhips_neutral)

Thanks for taking me to see this waterfall.
I’m glad I came.

    CASPER (talk_flirt_coy)

Oh, you’re welcome.

}

How do I let the questions show at the end so the story can continue thought?

By the way, check this post out in regards to animations and looping ones:

And when you’re using thought bubbles (having the character think something):

Don’t make them do a talking animation. Use a non-talking animation. You also have a bunch of spelling and grammatical issues. I recommend a proof-reader.

Also, for next time you can use this template:

Good luck with everything :black_heart:

1 Like

Thanks.

Bump :hibiscus: