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

yes :slight_smile:

2 Likes

Thank you!

1 Like

Bump :tada:

1 Like

Hey so I was experimenting with gains for the first time and I couldn’t get it to work. Basically the outcome would always be the one for good_grade, regardless of whether or not the choice for it was picked. What am I doing wrong here? Also thank you for this super helpful guide :slight_smile:

ELLA (talk_apathetic)
Choose a letter.
choice
“A”
{
gain bad_grade
}
“F”
{
gain good_grade
}
if(good_grade)
{
ELLA (dance_disco_loop)
(Yay!)
}
elif (bad_grade)
{
ELLA (idle_sad)
(Nuuu!)
}

1 Like

Hi there! You’re welcome, I’m glad you find the guide helpful! Regarding your question, maybe try this code:

ELLA (talk_apathetic)
Choose a letter.

choice
“A”{
gain bad_grade

goto got_grade
}“F”{
gain good_grade

goto got_grade

}

label got_grade

if (good_grade) {

ELLA (dance_disco_loop)
(Yay!)

} else {

ELLA (idle_sad)

(Nuuu!)

}

Try that and let me know if it works… I haven’t used the

Hi, my story keeps showing me that my labels aren’t used. Please help me! :pray:

1 Like

@Sofie67 please post you’re script so people can see what the problem is !

1 Like

label where_to_go
ELIZA (think)
(Anyway, where should I go?)
choice
“Maid” {

} “Servant at a new restaurant” {

} “Servant at the same restaurant as before” {

}

1 Like

Never mind! I already found the problem, but thanks anyway! :wink:

2 Likes

Bump

Hey everyone! I need serious help here :joy::joy:!!! Gains don’t work with outfit choices! If you want the reader to wear that outfit in further chapters, the script only remembers the first outfit you pressed because it’s the first gain you chose!! Someone help

1 Like

I’m pretty sure there is a way to get this to work but I’m yet to find it.
I let the reader pick their outfit and then put a choice underneath so they can select the name of the outfit they just chose and that then adds the gain to them.

That’s a great idea thx!!

1 Like

No worries!

1 Like

Is there a way to show the “breakdown” of points the reader has gained thus far, like at the end of a chapter?

The choice name method is best. Because if they try on every outfit, they can’t ungain it.

Dara has a template here

1 Like

Thank you so much!! :heartbeat:

1 Like

Omg! This is so much help! Thank you!

1 Like

hey! how would you use more than one gain, for example the reader needs to collect 3 items in a minigame to end it?