varying the scope of the noun in an action?

I’m trying to make it so one part of an action doesn’t default to only being applicable to visible things.

I’ve got:

What I need is for the first noun to have the usual rules apply, but for the second to be allowable for any character in the game, regardless of whether they are in the same place as the player. The Recipe Book implies that the “any” qualification should take care of this, but it isn’t working here. If I ask someone about a character who isn’t in the same room, I just get “You can’t reach into the garden” or somesuch. What am I missing?

I7’s syntax here is rather unfortunate: “visible” actually means “everything in scope,” not only something that the actor can literally see, and leaving out the modifier defaults to “touchable” so your action definition is equivalent to “…an action applying to two touchable things.” It’ll work if you change the action definition to “…an action applying to two visible things.”

…or if you want to force the noun to be touchable, you can do this:

Asking it about the person is an action applying to one thing and one visible thing.

“Visible thing” in code like this is confusing. In this context, “applying to one thing” means applying to anything the actor can reach/touch. When an action applies to “one thing,” between parsing and processing it applies the accessibility rules–which is what gives messages like “You can’t reach into the garden.”

“Applying to one visible thing” means applying to anything the player can refer to–which means anything that the player can reach/touch, anything that the player can see but not touch (e.g., things in transparent closed containers), anything that you’ve added to scope yourself, and (this is the one that applies) anything that got scooped up by an “[any person]” token or some such.

This is explained in Writing with Inform §12.17, but it’s awfully confusing, because “visible thing” tends to mean “thing you can’t actually see.” This has been baked into Inform so long that changing it would break a lot of code–the latest version explains that “visible thing” is a contrast to “touchable thing” and that “thing” defaults to “touchable thing,” but it’s still confusing.

(Juhana posted while I was typing, but my explanation is longer so I’m posting it in case it’s also helpful.)

It was very helpful! Thank you.