Reachability restrictions

I have absolutely no idea how to correctly formulate this. I feel like this is super-basic, but I can’t find anything about it. Basically, I want some objects to be unable to be taken by the player if the player is sitting down (on a chair, for instance). While we’re at it, I would also like to know how I can start the player in that position. Thanks in advance.

You could do something like this:

[code]A seat is a kind of enterable supporter.

Living Room is a room.

A large recliner is a seat in the Living Room.

The player is on the large recliner.

A piece of paper is in the Living Room.

Instead of taking something (called the desired item) when the player is on a seat (called the current chair) and the desired item is not enclosed by the current chair:
say “You can’t reach [the noun] from here.”.[/code]

You can also use a rule for reaching outside the recliner, as in §12.8 of Writing with Inform:

[code]A seat is a kind of enterable supporter.

Living Room is a room.

A large recliner is a seat in the Living Room.

The player is on the large recliner.

A piece of paper is in the Living Room.

Rule for reaching outside the recliner:
say “You’ll have to get off the recliner first.”;
deny access.[/code]

A nice thing about this is that it takes care of every action that requires touching the object. So if you added “A television is a device in the Living Room,” then this would automatically ensure that the player couldn’t switch the television off without getting off the recliner.

Thanks, this was exactly what I needed!