2 Answers

I suggest not putting the version of Twine and the story format within the title of your question as it just makes it longer without any real benefit, just using the question tags to supply that information is more beneficial.

You need to fully state each individual expression of a compound expression.

Thanks! I've been using mathematical operators thus far as I enjoy the cleanliness of it, but I've been considering going back through and switching as I have to remember that I need 1 when setting, and 2 when checking. Also, looking up when to use != instead of "neq" was a chore..

Your problem is that each sub-condition needs to be a complete expression. For example:

<<if $gameDay is 1 or $gameDay is 2 or $gameDay is 6 or $gameDay is 7>>
<<set $workAlert to true>>
<<else>>
<<set $workAlert to false>>
<</if>>

Alternatively. Unless you're doing other things not shown in your example, there's no need for the <<if>> here at all. You may simply set $workAlert to the result of the aggregate conditional expression. For example:

<<set $workAlert to $gameDay is 1 or $gameDay is 2 or $gameDay is 6 or $gameDay is 7>>

That's.. An interesting way of doing it. I hadn't ever seen an expression structured that way.

I have a separate passage counting the passage of time that's referenced during my "sleep" passage using <<display>> macros, so it'll add and change the day number and day name for it. The big thing is that I have jobs that fire the $workAlert boolean on different days. If you have X job, you work on X days, if you have Y job, you work on Y days. I wanted to make an easily referenced passage so I could just fill in the days work is required, and have the sensor NOT trip on days not worked. That way it's all automated if the player switches jobs down the line, I don't have to write whole new bits of script for those changes.

I'm learning a lot from creating a "Life Sim" in Twine, over the RAGS engine. Pushing Twine to do something it really wasn't designed for has been interesting.