Hello. I'm trying to add an aspect to my Twine game where the game goes to the ending if at any time a certain variable goes below 0. My understanding is to use a header passage.
I started my header with:
(if: $skill is < 0)[(goto:"Fail")]
This worked to send the game to the "Fail" passage in the event that $skill became -1 or less. However, it then endlessly completes the (goto:) because the (if:) is always true.
I am using Twine 2 with the Harlowe settings.
What do I need to do in order to make the code stop after arriving at the "Fail" passage? Thank you.
EDIT: Figured it out, though I'm not sure if it's the *right* way to do it:
(if: $skill is < 0 and $fail is 0)[(set: $fail to 1)(goto:"Fail")]