Tara explains: Ifs, elses, gains, labels, gotos and the points system!

Your topics are very useful :heart_eyes:
I have a question:
In my story I want to create choices that will affect the future.
For example:

if you choose to trust your best friend in episode 1, then in episode 3 he will remember that you trusted him and he will help you.
if you choose to don’t trust your best friend in episode 1, then in episode 3 he will remember it and he won’t help you.
as Same like realtionships, friendships etc.

I thought I had to use gains, like:
EPISODE 1
Choice
“FREAK OUT” {
MC talks…

gain FREAKOUT
}

“Calm down and sound like pi**ed off” {
MC talks…

gain Calm down and sound like pi**ed off
}

EPISODE 3
if (FREAKOUT) {
Friend “I’ll help you!”

} else (Calm down and sound like pi**ed off) {
Friend “I won’t help you”

}

AND

In my story I want to create choices that will affect the future.
For example:

if you choose to trust your best friend in episode 1, then in episode 3 he will remember that you trusted him and he will help you.
if you choose to don’t trust your best friend in episode 1, then in episode 3 he will remember it and he won’t help you.
I thought I had to use gains, like:
EPISODE 1
Choice
“Trust him” {
MC talks…

gain trust_friend
}

“Don’t trust him” {
MC talks…

gain notrust_friend
}

EPISODE 3
if (trust_friend) {
Friend “I’ll help you!”

} else {
Friend “I won’t help you”

}

Will it work or I have to change something? Do I have to use labels or goto?
Does not working! and i’m so confused. _ Im just beginner to gains, trust and etc. I know how to easy to basic choices.

1 Like


Here’s my screenshot.

And then

I add EPISODE 8

IF (FREAKOUT) {
CATHLYN “BALH BALH”

} else (Calm down and sound like pi**ed off) {
CATHLYN “BALH BLAH”

For you information i need help :sob:

1 Like

your gains can’t contain spaces, also I’m not sure if it will work with * as well

1 Like

Thank you so much for helping me Ape! :slight_smile:

1 Like

Hi

I have a question, what happens if I want to use if/elif/else using gains from two different choices. Can this be done, if so how?

For example:

Episode 2 - First Choice:
a) Respond to the text
b) Don’t respond to the text

I then have another choice in the next episode, which is only available to the reader if they chose not to respond to the text.

Episode 3 - Second Choice:
a) Name drop
b) Blag it

In another episode I want to use if/elif/else across both choices but I didn’t realise you could merge branches and now my story is published :\ I do have gains for each choice chosen.

This is basis of:

If - Respond to the text (Episode 2,choice 1)
Elif - Name Drop (Episode 3, choice 2)
Else - Blag it (Episode 3, choice 2)

I hope I have explained this clearly, any help/guidance would be much appreciated.

Many thanks, H xxx

1 Like

Have a look here, hope my example will help you :slight_smile:

3 Likes

Basically, your if/elif/else needs to look like this:

if (Respond to the text)
if (Name Drop) {
[script for respond to text and name drop here]
} else {
[script for respond to text and blag it here]
}
} else {
[script for don’t respond to the text here]
}

2 Likes

So example of my code wouldn’t work here if you would use gains for every option? :thinking:

1 Like

Thank you so much Dara.Amarie and Apes - both work for me!

You are literally life savers :heart:

I can’t thank you enough! xx

2 Likes

No problem, I’m glad you found this article helpful and do let me know if you need help with anything! xx

1 Like

I think your gains ideally need to be non-capitals and contain no spaces or symbols. I myself do not use gains very often, and I’m a larger fan of the points system; but if you wanted to use gains in this scenario, your coding looks right, I’d just maybe call the gain “freakout” and “calm_down” to make them easier to type and to ensure they work. Let me know if you have any problems!

1 Like

Thank you so much! It’s really worked now! :slight_smile: I will let you know when i have any problems :slight_smile:

1 Like

I believe so - it should work, I hope. As far as I know, the only coding that I’ve written about that won’t work through episodes is when I did an article on how to have choices that matter without complex coding. Other than that, usually coding I write about should work throughout a story.

Hey, can any of you guys explain how i can show the reader how many points they have. Is there a special command to show how many points like in the ruby tiara where the author at the end of the episode said you had (number of points)/37

1 Like

Unfortunately a shortcut for this doesn’t exist at the minute - the only way is to use lots of if/else coding so that if the reader has a certain number of points then a narrator box says a message announcing this number of points. But creating that coding can be time consuming if there are lots of points up for grabs in your story!

Thank you for this guide, @TaraStar. I really wanted to know more about the points system.

1 Like

No problem, I’m glad to help!

1 Like

IF my story had three romantic choices, how would I use points or gain to decide who the character will end up with?

1 Like

Hi, @TaraStar, I have a question.
How can I use points to compare characters? Like if CHARACTER1 and CHARACTER2 have the same points or not, stuff like that.
And also, how could I reset gains and points?

1 Like

You can’t reset gains/lose them-once they are gained, they are there for good : )

Although, you could like this thread that supports losing gains:

But yes, there is a way to reset points:

@CHARACTER =0

*CHARACTER is just an example; it can be any person that is part of your story, like the character YOU.

@YOU =0

Once you write this, it automatically clears any points that the character earned and resets their points gained back to 0.

Another thread that explains the point system:

Anyway, good luck with everything!

4 Likes