I want a button to be pressed but also be scenery (i.e. not shown in description of room)

Sorry I’m a bit new to Inform 7.
Can anyone help me solve this problem? I have a device with a flashing button that I want to be pushable but I don’t want “The button is here” reiterating what is already in the description. Here’s what I wrote:

The Old Television Monitor is east of the Mud Room

“There is an on old television monitor placed in a reset of the wall. A rectangular box-like device sits upon it, one of its buttons displaying a blinking triangle.”

The box is here.
The box is scenery.
Before taking box: instead say “You try but it’s bolted down and plugged in.”
The box is scenery.
Before taking box: instead say “You try but it’s bolted down and plugged in.”

The button is here.
The button is scenery.
The button can be pushed.
after pushing button:
say “The box’s screen lights up and you see…”

The button won’t show up in the room description as you’ve written this, because it’s scenery, though this creates the problem that you can’t push scenery by default. A simpler approach might be to incorporate the button into the box – if you sub out the three lines “The button is here”, “the button is scenery”, and “the button can be pushed” (which I’m not sure does anything?) for “the button is part of the box” you should get the behavior you want. 3.23 of Writing with Inform might be helpful to consult, too.

Hope this is helpful!

1 Like

This creates an either/or property for the button with two states- ‘not pushed’ (default) or ‘pushed’. I’m not sure this is what was intended. It is not required for the button to have a property like this in order to allow the ‘Push’ action to be applied to it (e.g. ‘push button’). See WI §4.7 New either/or properties.

2 Likes

A really useful trick to know is that if you print the name of an object in a room description by enclosing it in square brackets, it then won’t be mentioned again (See WI §18.24. Writing a paragraph about)

“There is an on old television monitor placed in a reset of the wall. A rectangular box-like device sits upon it, one of its [button]s displaying a blinking triangle.”

This is the simplest way of avoiding things being mentioned in both the room description and later paragraphs without making them scenery- which renders them somewhat inert.

3 Likes

Excellent! Exactly what I wanted! Thank you

Thank you. This will be really helpful to me as I trudge on with other rooms. Cheers!