how to and in if statement

–2 votes
asked Feb 11 by diazepamdiva (200 points)

1 Answer

0 votes
answered Feb 11 by greyelf (65,750 points)

Please you the Question tags to state the name and full version number of the Story Format you are using, as answers can vary based on that information.

Harlowe:

(if: $var1 is "A" and $var2 is "B")[
This text will only appear if both conditions are true!
]

(if: $var1 is "A" or $var1 is "B")[
This text will appear if at least one of the conditions is true!
]

SugarCube:

<<if $var1 is "A" and $var2 is "B">>
This text will only appear if both conditions are true!
<</if>>

<<if $var1 is "A" or $var1 is "B">>
This text will appear if at least one of the conditions is true!
<</if>>

Snowman:

<% if ($var1 is "A" && $var2 is "B") { %>
This text will only appear if both conditions are true!
<% } %>

<% if ($var1 is "A" || $var1 is "B") { %>
This text will appear if at least one of the conditions is true!
<% } %>

 

Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.
...