Login
Remember
IF Answers
Ask a Question

# How do I display the full / initial room description when the player looks?

+1 vote
71 views
asked Mar 29 in Authoring by Paul_Erdos (39 points)
retagged Mar 29 by Dannii

I want to have more descriptions of rooms when they're first entered, which is well handled by the usual [if unvisited] method. I can then write a new, concise description in the [otherwise] section. This works well, but I want the player to be able to re-read the initial description if they want, i.e., when they explicitly ask to look at the room again. I can't seem to figure out how to reuse the initial description. I haven't tried, but I wouldn't think resetting the room to unvisited if they look is a good idea, as it might screw with other things that rely on knowing if the room is unvisited.

Is there a good way to get this to happen while still having all the text nicely consolidated in the room's description, or will this require special rules and conditions?

    Pretty Landscape is a room. "[if set to unabbreviated room descriptions]Rich, descriptive imagery![otherwise]You are here. You can do this and that."

    Instead of looking:
        now use verbose descriptions;
        say room description;
        now use brief descriptions;
    [this isn't flexible, it would rest whatever description setting was there initially]

- inform7
- rooms
- descriptions
- verbosity

commented Mar 29 by Paul_Erdos (39 points)
the markdown is kindof weird, backticks don't seem to work for code, and it's wrapping all weird.

## 1 Answer

0 votes
answered Mar 29 by bg (692 points)
selected Sep 7 by Paul_Erdos
Best answer

Here's one way you could do it.

    Pretty Landscape is a room. The description of Pretty Landscape is "[if long-desc is active]Long description goes here[otherwise]Short description goes here[end if]."

    To decide if long-desc is active:
        if the location is unvisited:
            decide yes;
        if the player's command exactly matches the text "look", case insensitively:
            decide yes;
        if the player's command exactly matches the text "l", case insensitively:
            decide yes;
        decide no.

commented Mar 29 by Dannii (329 points)
Rather than testing the player's command I'm sure you could directly check whether the current action is looking.
commented Mar 29 by bg (692 points)
edited Mar 29 by bg
@Dannii--I would, but I don't know how to do that and still make the short description show when you enter a visited room. I was testing the player's command as a way of distinguishing between an automatic looking action that happens when you enter a room, and a manual looking action.

## Related questions

- How to get rid of a rule that's blocking what I want the player to do? (Inform 7)
- Inform: How do I find the word count for text the player can read?
- Inform: How do I get the player to input a name for themselves? The name keeps changing to whatever the player typed last!
- How do I change 'if the player consents'? pre-Inform 6L or post-
- Forcing the player to be on a vehicle when entering a room

...