Gains/if and else/choices

I have a question about using gains and choices in my story. So in my story I’m letting the reader choose between dating girls or boys. Well I added the gains and if/else and it works great for choosing boys. But if you want to choose girls, clicking that option just brings the reader to the story if you chose boys?? I’m not sure what went wrong but its not taking the reader to the girls story. Help??

You can’t just make a separate story for girls and boys, you would have to code it into your script

Can you post that part of your script?

I think its already coded in my script. In the beginning theres the option for choosing whether you like boys or girls and they both follow the same story (with different genders) but if you click “girls” it takes you to the boys story

Actually they could make a separate story if they wanted to however I believe they are trying to put the option into one story as mentioned above ^^

This is where the gains start and under it is the label for boys, then down more into the story is the label for girls

For example

NARRATOR
Do you like girls or boys?
choice
“Girls”{
gain girls
}
“Boys”{
gain boys
}

Then later in your scrips, you can use the gains, like so

if (girls) {
@GIRL enters from left to screen center and GIRL faces right
} elif (boys){
@BOY enters from left to screen left
}
@JemU776 ok that’s technically true, but not using gains, ifs, and elifs

It could be because you haven’t reset your story progress or refreshed the page. If you keep testing that choice out you’re gaining both those gains.

But you don’t need an if/else at that part. You can just put the goto’s inside the choices.

To see how to reset flags (which are gains), can check out:

So can I replace

if (dateboys) {
goto dateboys_branch
}

and just make it

goto dateboys_branch {
}

Your coding is already fine : )

NARRATOR
What is your dating preference?
choice
"I like boys: {
gain dateboys
goto dateboys_branch
} “I like girls” {
gain dategirls
goto dategirls_branch
}

if (dateboys) {
goto dateboys_branch
} else {
goto dategirls_branch
}

Can I use that at the beginning of the other chapters to this story?

Oh resetting the flags worked thank you!

No, that’s when you need to use the if/else code, but you don’t need to add it right after the choice because it’s pretty redundant.

Oh okay thank you!

No problem :wink:

Solved and closed. :smiley: