Can anyone explain me about the gains and the ifs?

I saw some people asking about the gains and the ifs but I don’t have clue with it :thinking: I kinda feel that this had to do with the past choices or sth ? :sweat_smile:

Yeah, it’s how you remember past choices. So let’s say you have a basic choice:
MC
Here’s a choice.
choice
“Option 1” {
gain opt1
} “Option 2” {
gain opt2
} “Option 3” {
gain opt3
}

You can include other dialogue and actions within each choice, but the gains are what matter here. Your story will remember this for the rest of the story. You use if statements to bring them back up again at any point in the story after that choice. There’s if statements:
if (opt1) {
MC
I chose the first option!
}

If/else statements:
if (opt1) {
MC
I chose the first option!
} else {
MC
I didn’t choose the first option!
}

Then there’s elif statements:
if (opt1) {
MC
I chose the first option!
} elif (opt2) {
MC
I chose the second option!
} else {
MC
I chose the third option!
}

You could use any of these, but the “elif” statements are best if you’re looking at three of more possibilities.

1 Like

: HOW TO: Remember Past Choices (if/elif/else)

1 Like

Thank you so much :sparkles:

1 Like

Thank Youuu For Helping Out :sparkles: