*if or selectable if but under two conditions

So i am in need of offering choices that are selectable IF, player has two things set properly. And if not, then other choice is offered. Not sure have i explained it properly, but here is an example of what i mean.

*selectable_if (strength > 10) and (hassword = 1)
#ChoiceHere
Blablabla

*selectable_if (strength <15) and (hassword = 0)
#ChoiceHere
Blablabla

How would i get this to work?

put the conditions in brackets, and the #choice on same line directly after with a single space, then the body indented below as usual:

*selectable_if ((strength > 10) and (hassword = 1)) #Choice
    text
*selectable_if ((strength <15) and (hassword = 0)) #Choice2
    text2

and make sure you can’t get to the choice with no valid options available to select

2 Likes

You would have 4 conditions with your strength/sword example: {+Strength/+Sword, +/-, -/+, -/-}.

*choice
   *selectable_if (strength and sword)
   *selectable_if (strength and not(sword))
   *selectable_if (not(strength) and sword)
   *selectable_if not(strength and sword)

Of course, numbers could be different if two of those combinations can share an option. Or if you want different options for every range of strength you want to come up.

2 Likes

Took me a while to spot that, if you take the notes into account, the two offered solutions are the same! :smiley:

So, if strength can be 15 or greater without a sword / OR / <10 with a sword … you should have four options, or else “no choice” can be made (which you wouldn’t want, or at least, might not want without recording it/doing something).

[coding is fun :wink: ]

1 Like

Got it, thank you both for quick help!

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