I’m hoping this is just a simple lack of knowledge about syntax, but it’s such a broad thing I’m struggling to find the right set of keywords to search the documentation.
Is there a basic way to lump a few things together when writing an “if” statement? Let’s use rooms for instance. Is there a way to write this fake code correctly?
say "[if the Library|Parlor|Kitchen is visited]Text[otherwise]Different text."
I’m sure I could lump them together by defining a “kind” but that seems clunky-- in my specific need, it’s just a one-off variation in a NPC dialogue response. Also, I could just write a bunch of [otherwise if…], but same thing, seems like overkill.
Yeah, that’s a common English vs. programming-language thing. In programming languages, OR, AND, etc. only combine full true/false statements like the Library is visited. They’re not smart enough to realize that in some phrases you meant them to combine the values (Library or Parlour or Kitchen) instead.
With the notable and extremely confusing exception of Inform 6 and earlier, which lets you say if(x == 5 or 6 or 7). (It descends from Inform’s original purpose as a glorified assembler with some syntactic sugar—this is how its target architecture’s “branch if equal” opcode works.)