Actions applying to objects in other room

Does anyone know a good way to make it so an action can apply to things not in the room? I want to make it so the player can talk about any known object, as opposed to using text, but keep getting errors because Inform doesn’t seem to think that things not in the room exist.

In Inform 7, you can use “any thing” (or anything) instead of “something” to refer to objects out of scope:

Thinking about is an action applying to one visible thing.
Understand “think about/of [any thing]” as thinking about.
Carry out thinking about:
say “So, you think about that for a while.”

One problem is that out of the box you would get different answers for objects that do not exist in the game and objects that do, which gives the player a way of finding out which objects they can expect to encounter.

Understand the commands "ask" and "tell" as something new. 

Askking it about is an action applying to one thing and one thing. Understand "ask [any thing] about [any thing]" as askking it about.

Even with the above, I still get “You can’t reach into [room name]” error messages.

You need that word “visible” in there.

Askking it about is an action applying to one visible thing and one visible thing.

Probably only the second noun needs to be marked “visible” and “any”. The first noun, the person you’re talking to, typically should be in the same room.

1 Like