Writer's Portal Update: Labels and Branches

I is confustion :rofl:

2 Likes

I think it could be used like this. Let’s say you had a LI choice with Bob and Brad (names chosen randomly lol), but if the reader has tied points, they get to make a choice.

if (BOB > BRAD) {
goto bob_choose
} elif (BRAD > BOB) {
goto brad_choose
} else {
continue
}

NARRATOR
Your points are tied. Who do you choose?
choice
“Bob” {
label bob_choose
NARRATOR
Text here.
} “Brad” {
label brad_choose
NARRATOR
Text here
}

Someone correct me if I’m wrong lol as I haven’t actually tried this yet. But that’s an example of how I think you can use it.
Honestly I’m so used to the old way that I’ll probably continue to keep my labels outside of choices/brackets.

21 Likes

What do you normally do it?

3 Likes

Without having labels in choices, I would do the above example this way:

if (BOB > BRAD) {
goto bob_choose
} elif (BRAD > BOB) {
goto brad_choose
} else {
continue
}

NARRATOR
Your points are tied. Who do you choose?
choice
“Bob” {
goto bob_choose
} “Brad” {
goto brad_choose
}

label bob_choose
NARRATOR
Storyline goes here.
goto end_story

label brad_choose
NARRATOR
Storyline goes here.
goto end_story

label end_story

4 Likes

Ah, I see, thank you! I’ll probably do it the old way too.

2 Likes

Oui, @EliseC explained it well :blob_sun:

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 appear to work with if/elif/else (labels go inside). When I tried/coded it, it didn’t give me an error although I have yet to test it for myself on the app (I’m not on my phone right now lol) :blob_hearts:

18 Likes

THANK YOU :sob:

1 Like

YES, YES, FINALLY! :heart_eyes:

1 Like

Honestly I don’t really see the use for this, exept maybe for having to use less code since you don’t have to rewrite the same choice over and over again.
But maybe I don’t fully get it?

A delete story button would have been more useful, or removing of gains :wink:

6 Likes

I can’t think of a use of this for my story :no_mouth: it would be nice if we had a choice inside a choice instead, but thanks for the update.

1 Like

You can already have choices inside of choices…? It’s slightly confusing but it’s doable.

1 Like

You need to put a label inside the choice that leads you to a label outside that choice, as far as I know.

1 Like

You can have a choice inside a choice, though :thinking: The same as you can have a choice inside an elif-statement.

choice
“I want to stay home.” {
bla
} “I want to go out.” {
MC
Where do I want to go?
choice
“The club.” {
bla
} “The park.” {
bla
}
}

2 Likes

Was just about to put the same thing :sweat_smile: thank you

2 Likes

Bahah, no problem :grin:
The only tricky thing is keeping count of the closing brackets :sweat_smile:

2 Likes

Really? :open_mouth: I’ll try that later!

1 Like

This is great! I think I had tried to do this on more than one occasion and was met with an error, so - awesome job! :star_struck:

4 Likes

So confusing!

2 Likes

Finally! I really needed this 2 days ago so am super glad it’s been added!!!

1 Like

i aM cOnfUsiOn :cowboy_hat_face:

2 Likes