Scopability by Brady Garvin


When Scopability is included, every object can be either scopable or unscopable. Most are scopable, which means that they are subject to Inform's usual scope rules. But unscopable objects are never acknowledged by the parser, even if we try to explicitly add them to scope, which is useful for modeling objects that are present, but that the player character cannot see.

Objects declared as initially unscopable are scenery unless we state otherwise; non-scenery usually appears in room descriptions, which would contradict the supposed invisibility. However, scopable and scenery status are toggled independently thereafter, so revealing an object usually means changing both properties.

Example: * The Visitor - An object that is present but unrevealed.

"The Visitor"

Include Scopability by Brady Garvin.

Cavern is a room.
The rocky debris is scenery.
The alien artifact is an unscopable thing in the cavern.
"It's embedded in the rock!"

Every turn when the alien artifact is in the location:
     say "There's a faint humming coming from above."

Instead of listening when the alien artifact is in the location:
     say "Hmmmm hmmmm hmmmm. Hm hm hm hm. Hmmmm hm hm. Hm. Hm hmmmm. Hm hmmmm hm."

Instead of jumping when the alien artifact is in the location and the alien artifact is not scopable:
     say "The jolt shakes [rocky debris] loose from the ceiling, revealing [an alien artifact]!";
     now the rocky debris is in the location;
     now the alien artifact is scopable;
     now the alien artifact is not scenery.

Test me with "z / listen / x artifact / jump / x artifact".