[Harlowe 2.1.0] How does one combine two stats so an event can occur?

0 votes
asked Mar 13 by babybuddha (120 points)

Hi there, I'm new, and I'm wondering how I can put together two stats so an event can occur. I understand the use of true statements and the points system, but I don't know how to put them together. For example, the 10 STR and 10 DEX that is required to make an event happen, how do I code that together?


(if: $STR >= 75 & $DEX >= 60)[\
I did it!]
(else-if: $STR >= 20 & $DEX >= 20)[\
Good job!]

Is it possible to do it like this?

1 Answer

0 votes
answered Mar 13 by TheMadExile (38,930 points)

You want to use the logical and operator.  For example:

(if: $STR >= 75 and $DEX >= 60)[\
I did it!]
(else-if: $STR >= 20 and $DEX >= 20)[\
Good job!]

See the Boolean data section of Harlowe's manual for more details.

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.