I’ve been trying to find out how to force an object description. For context, there is a television in the room that the player is in. When they change the channel by using the command Channel Up or Channel Down the description of the television changes.
I’d like changing the channel to print the “look at” description of the television, to save the player also having to type “look at” after, but I’ve been unable to find a way to do this.
I did find it’s possible to force a room description with
produce a room description with going spacing conventions;
But I’d like to apply this just to an object.
How about this–
After channeling up:
say "You turn the dial to the next higher channel, channel [channel number].";
try examining the television set.
The last line will get the player to automatically do that action.
Works perfectly, I’m quite new to Inform 7 wasn’t aware of the “try” mechanic. This will be extremely useful moving forwards. Thank you!
No problem. One good thing about ‘try’ clauses is that they do not add to the turn count, so you really get two (or more) actions for the price of one.
The more you use Inform, the more all this becomes second nature–you’ll be able to create rooms and puzzles easily, before long. Don’t be discouraged–I’ve been using it for 5 years and I am still learning.