Multiple gains — how to take into consideration all of them at once?


I hope you guys are doing great!

I am trying to code different endings that would depend on what you have or haven’t gained in your story. For example, you can gain someone’s respect, love and, say find a special item. I use gains for all these commands.

Then, I’d like to code different endings, for example, the first one where you managed to gain everything, the second one where you gain a combination of features and the third one where you gain nothing.

How would I code that using the if/elif command if I just put in brackets one gain?

For example, can I put if (gain_respect, gain_love, gain_item) together for the 1st ending and, say, elif (gain_respect, gain_item) and elif (gain_love, gain_item), elif (gain_respect, gain_love) and else . If not, how do I do that?

Basically, how would I code this type of thing? I hope I explained it clearly enough.

I would highly appreciate any help on that!

Thank you very much in advance!

Hi, Alex :slight_smile:
It would look like that:

if (gain_respect and gain_love and gain_item) {

} elif (gain_respect and gain_item) {

} elif (gain_love and gain_item) {

} elif (gain_respect and gain_love) {



I see, thank you very much, I will try that out!


Did this answer your question? :slight_smile:

1 Like

I hope so. I haven’t tried this out yet though.

1 Like

Be sure to let us know if it works! :slight_smile:

1 Like

I will, thank you!

1 Like