Gain not working?

I’m new to gains and am having trouble with one. They span across two episodes, and in the first episodes have three parts. Here’s the code:

choice
“Make sure Abby’s dad meets her” {

#dialogue

gain willmeet

}
“It’s took risky and against my dad’s wishes to have Abby see her dad” {

#dialogue

gain willnotmeet

}

The gain “willmeet” does work, but “willnotmeet” does not work. I am able to press the second option that has the gain “willnotmeet,” but does not recognize it. If I press the choice for “It’s took risky and against my dad’s wishes to have Abby see her dad” (the choice for the gain “willnotmeet”), the gain is not counted. Here’s the code for later in the episode that the gains are used:

if (willmeet){

#dialogue

}else{

#dialogue

}

And, the third and final time in the episode:

if (willmeet){

#dialogue

}else{

#dialogue

}

In the following episode, the gains are in the first scene. Here’s the code:

if (willmeet){

#dialogue

}else{

#dialogue

}

Sorry if this is confusing. Thanks!

Try this instead of ‘else’

if (willmeet){

}
elif (willnotmeet) {

}

pls, can you describe a bit more what you mean by that the one gain works and the other not?

Does that mean that when you test it in the next episodes you regardless of what you have chosen always get the 1 option?

if so

go to the episode where you have the choice - refresh the page and choice the 2 choice (the refreshing is important)
after that in the preview - story modifiers - flags. the willnotmeet should be golden - if it is it was registered by the script right

if you do not refresh - the script in the portal remembers the gain it already got so if you fit tested the first one it will go there all the time.

BTW you do not use this gain in the script so it is not actually necessary to ad willnotmeet it at all.

you need always one gain less then is the number of choices, because the last one uses "else! and is there written without the condition (gain)

And just a note to the hint above - no need to change it to elif, your coding is OK for 2 choices. :wink:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.