[I7] Combining 'If unvisited' with other conditional

Running into a lack of understanding of Inform 7 syntax and scouring documentation was without success. Trying to combine a second conditional with [if unvisited]. Specifically, I have multiple characters so my made-up code looks something like this:

[if unvisited and the player is not Frank]

Any advice on how to actually write that?

In brackets for text substitutions you need to specify what your conditions apply to, unlike the shorthand I7 lets you sometimes get away with when you define a room or a thing. I did not test this, but maybe try:

[if the location is unvisited and the player is not Frank]

1 Like

Specifically, from Example 4 (Slightly Wrong) in the documentation:

Some further fine print: we might write our condition as “if unvisited”, “if the location is unvisited”, or “if the Chamber is unvisited” – all of these constructions would be acceptable, but in the absence of more specifics, the condition is understood to apply to the object whose description it is.

So if you just put an adjective on its own, Inform can figure out what it needs to go to, but more complicated constructions need to be written out in full like Hanon’s example.

1 Like

Just to add even a bit more detail: when you use a bare adjective like that, Inform applies the adjective to “the item described”, which generally refers to whatever object is, well…currently being described. But it works in other properties, too, besides the “description”: anything that’s a property of an object can reference that object through “the item described”. (It maps to the I6 “self” variable, which means you can even use it in Understand lines for objects, since they end up stored in the I6-level parse_name property!)

You’re all my favorite people. Thank you!