🖤 HOW TO: Labels and Gotos 🖤

Hey there, I’m going to talk about labels and gotos! :wave: :revolving_hearts:

A goto leads to a label that it shares the same name with. For example goto friend would lead to label friend. You can have duplicate gotos within an episode that all share the same name but you can’t have duplicate labels in an episode. This can be seen with a customization template; for example, when you’re getting your hair customized and choosing from short hair styles, all the gotos share the same name and will lead you back to one label for short hair styles. In addition, you can name your label and goto anything however label and goto names cannot contain spaces or special characters such as &. If you write label spooky house, you will get an error. You also can’t end an episode on a label.

UPDATE:

Labels can now go inside of if/elif/else statements and they can now go go inside of choices. You can stick with the old way of putting a goto in if/elif/else statements and/or choices that would lead to a label outside of them (and then you can use another goto to merge both pathways, and this that would lead to a label that it shares the same name with) if you’re used to that.

Example

if (BAD) {

goto villainbranch <—if they have chosen being bad before and have the gain/flag BAD (or whatever the gain name is), then this goto will take them to the label it shares the same name with (so goto villainbranch will lead to label villainbranch, which we know is inside the choice “I’m a villain” down below)

} elif (GOOD) {

goto herobranch<—if they have chosen being good before and have the gain/flag GOOD (or whatever the gain name is), then this goto will take them to the label it shares the same name with (so goto herobranch will lead to label herobranch, which we know is inside the choice “I’m a hero!” down below)

} else {
<—Here they may have previously been good or bad or chose another option, since they didn’t gain GOOD or BAD so in this case, they have the option to choose whether to be good or bad in this situation.
}

#else pathway continues (you are asked if you’d like to play through the hero or villain choice) So in other words, it’s your choice. See, it’s fun being neutral : D

WISE SOUL
Hi, are you a hero or a villain for this choice?

choice “I’m a hero!” {

label herobranch (people who had gain/flag GOOD and then reached goto herobranch there were lead here)

YOU
I’m a hero!

#continue

} “I’m a villain” {

label villainbranch (people who had the gain/flag BAD and then reached goto villainbranch there were lead here)

YOU
I’m a villain!

#continue

}

#Back to the main story-line

Also since labels are allowed in choices, it appears that you can include dressing games and CC template inside of choices now. In addition, they work with if/elif/else (labels go inside). When I coded it, it didn’t give me an error :blob_hearts:

*I highly suggest you go over the example.

Anyways, to continue:

A reminder that if you do get a duplicate label warning because you have two labels (let’s say label makeup) in your episode, you can fix the duplicate label by either adding something to it or re-naming it. For example, I can add a 2 to it so that it becomes label makeup2. However, remember that if you do this, you need to add a 2 to the gotos as well so that they will lead to label makeup2 (so, ONLY for the gotos that would lead to this label). If you forget to do this, then you’ll get an error saying your label doesn’t exist. If you do add a 2 to the gotos so that it becomes goto makeup2 but miss one, then what will happen is that goto makeup in your second makeup game that you labeled makeup2 will lead ALL THE WAY back to label makeup which will just mess up everything up. You don’t want that, you want a smooth flow to your story. So yeah, if you have a dressing game in your episode, and decide to use it again, you will need to change the label for the second one and make sure the gotos of the second dressing game match the new label you use as well.

The duplicate labels rule is only present per episode. If you use label fun in episode 1, you can use it again once in episode 2 and so forth.

P.S I go more into why it’s bad to duplicate labels on my thread: JemU776's Help Thread (link will automatically lead you to the post about it)

Feel free to check it out <3

Here’s a picture:

Let me know if you want me to post anything else and I hope that this helps, now I’m off to listen to MIW and other cool bands/singers xoxo :kiss:

^^

25 Likes
My Label "goto choose_outfit" isn't working. Help!
HELP! If/elif/else goto
Dressing game inside a choice
𝓤𝓼𝓮𝓯𝓾𝓵 𝓛𝓲𝓷𝓴 𝓜𝓪𝓼𝓽𝓮𝓻 𝓛𝓲𝓼𝓽 - every useful thread you could think of!
JemU776's Help Thread
JemU776's Help Thread
"Stupid" questions that never get answered? Get The Help Here!
How to lock chapters during revamp?
HOW TO: Color Code and Lock A Choice
Coding for MC gender and their love interest's gender
Help with limited customization xxxx
Looping Choices?
"Stupid" questions that never get answered? Get The Help Here!
Using a choice to go back
Send help please
JemU776's Help Thread
Coding bug 🦠 Helppp!
Directing and choices
I need some script help plz!
ERROR! Help me!
:black_heart: TEMPLATE: Showing Individual Character Points in A Choice :white_heart:
How to make multiple choices in a choice?
:unicorn: JemU776's Magical Reviews (Temp Closed) :lollipop:
"Stupid" questions that never get answered? Get The Help Here!
HOW: Help, I want my story to be two languages
Practice Creating Mini-CC templates! :heart:
"Stupid" questions that never get answered? Get The Help Here!
Ending script help
JemU776's Help Thread
Label error with tappable OL
Can I make the readers choose who character they will be playing as?
Editing assistant help?
My script is all messed up. I'm trying to allow charcater to choose
It says my labels wrong
How to do this type of thing
Advanced script help
"Stupid" questions that never get answered? Get The Help Here!
Appreciation Thread For Jem! :heart:
"Stupid" questions that never get answered? Get The Help Here!
"Stupid" questions that never get answered? Get The Help Here!
Need Help For Dressing Game
Help! I don't understand this!
Overlay + error 11 help!
Help choices! How use it
Why is my script not working
What happens after the reader makes a choice?
What happens after the reader makes a choice?
How to change the choice and go back to the last set of choices
Script Template Help *Duplicate Labels Warning
"Stupid" questions that never get answered? Get The Help Here!
:gem: JemU776's Tutorials LIST (Full) :gem:
Error with Dressing choice
How to properly enter a long subplot
WHAt....? Je suis confused the heck up
Label in brackets
Helpful Links for Authors :blob_hearts:
Choice outfits labeling
Choice please Help
Tappable overlay buttons?!
Redoing choices
The Complete List Of Coding Tutorials! (:
How do you lock a certain feature in CC?
Can anyone help me with this coding error?
:rainbow: CODE: Making A Main Menu :prideheart:
The Complete List of Everything - Updated! {Art Shops, Reviewers + More!}
Writing tips or "coding"
Error in script with choices and bonus scene
HOW TO: Customize Characters
Helpful Links :blush:
HOW TO: Use [shouldPaginate: YES]
LL Hairstyle, Color, & Lips: Label has never been used
Help with Labels!
How to add your custom tapple text bubble overlays?
Different Outfit changes in one chapter error - Helpppp
Tappable intro template/help?
Problem when making choices
An bracket error that I can't fix
How do I make my character walk to a certain place?
JemU776's Help Thread
Please someone help me. Duplicate troubles
Choice Within A Choice (Help)
Rights Reserved Choice
Is there a proper way to code these? :thinking:
Where did you learn how to code?
"Stupid" questions that never get answered? Get The Help Here!
"Stupid" questions that never get answered? Get The Help Here!
Choices help once again pleaseee
Need help with name choosing for 2 LL characters, one female, one male
HELP: Selecting a character to customize
HOW TO: Reset Story Progress + Bonus Stuff :blob_sun:
Locked choices and point system
Visual CC Help?
:four_leaf_clover: HOW TO: Choice Inside Choice :yay:
How outfit can be affected on the story?

Thanks for checking this out guys, you all rock :tulip: :rose:

BRANDI (think_rubchin)
(Should I enter this haunted house or not?)

The ) should be there, it’s making my eye twitch lol :joy:

4 Likes

Love it Jem! Thank you! BOOKMARKED! :heart_eyes::heart_eyes::heart_eyes::heart_eyes::heart_eyes::heart_eyes::fire::fire::fire::fire::fire::fire::fire::blush::blush::blush::blush::blush::blush:

1 Like

Jem you are a gem! :yay:
I needed this to.

2 Likes

@lanafrazer_episode and @LiyahxWrites thank u guys :nerd_face:

3 Likes

Bump :disco:

2 Likes

This is absolutely amazing! Thank youuuu!! :heart:

1 Like

Bump :100:

Bump :blob_sun:

Bump :chef:

Bump :chef: :chef:

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