If/Elif/Else Choice Help

So, I’ve seen this used in stories before but I’m not sure if using if/elif/else is how you accomplish this, but basically I have a choice scene w/ 2 LIs where the MC gets to choose which LI she wants to spend time with. After I coded this scene, it got complicated, because I switched to another scene that was supposed to be happening at the same time… say the MC chose to be with LI 1. Well, that means LI 2 is the one the reader will see in this other scene that’s supposed to be happening simultaneously, if that makes sense. So basically I’m trying to code the second scene now, where whatever LI you do NOT choose will appear & talk. If anyone understands my crazy rant lol I’m just asking if I would use the if/elif/else branches to go about this, & if so, what would that look like?

A code like this should work

choice (date)
“LI1” {
goto li1scene
} “LI2” {
goto li2scene
}

label li1scene
#scene here
goto afterliscene

label li2scene
#scene here
goto afterliscene

label afterliscene
if (date is “LI1”) {
#scene with LI2
} else {
#scene with LI1
}

2 Likes

Hi basicly you need the script to remember the choice so you can use it later on.

One way how to make script to remember choice is to name the choice - as described above

Another way is to use gains (in my opinion it is bit easier then named choice - but both will give you the same result).

How the choices with gains work:

  1. add to your choice

gain name_of_the_gain

the name of the gain is basicly a code word so you ca use anything you want (it just have to be one word.

so it can be for example:

gain LI1
gain John
gain 121ggggzRFSFE
gain first_choice

and the choice will look like this:

choice
“LI1” {
gain LI1
#here write the scene what happens it they will choice LI1
} “LI2” {
gain LI2
#here write the scene what happens it they will 2
}

And when later in the story you will need an outcome based on this choice you will write:

if (LI1) {
#scene with LI1
} else {
#scene with LI2
}

Here you have it more in detail:

3 Likes

Thank you, I’ll try that!

1 Like

Thanks girl!!

Glad this was taken care of! Closing :grin: