Login
Remember
IF Answers
Ask a Question

# How do I print two distinct objects from a list (Inform 7) in a description?

0 votes
60 views
asked Jun 24 in Authoring by NewcomerToInform7

I couldn't find the answer on the forums or the documentation -- it might be there, but I couldn't find the right combination of words to search for.

Anyways, my question is hopefully simple. I'm using Inform 7.

    A monkey is a kind of animal.
    Typewriter Chamber is a room.
    Alice, Bob, and Charlie are monkeys in Typewriter Chamber.
    Typewriter Chamber has the description "[The random monkey in
        Typewriter Chamber] is currently running around [the random
        monkey in Typewriter Chamber]."

This allows the scenario in which both monkeys chosen are the same. I want them to be distinct -- that is, I don't want it to ever choose the same monkey for both of the choices. What is the right way to do that? Is this possible in Inform 7?

- inform7

## 1 Answer

+1 vote
answered Jun 24 by bg (692 points)

In this case I think you could use the mentioned/unmentioned property:

    Typewriter Chamber has the description "[The random monkey in
        Typewriter Chamber] is currently running around [random unmentioned
        monkey in Typewriter Chamber]."

There's more on this in "§18.24. Writing a paragraph about" in the manual.

## Related questions

- how do I print a message on the Xth turn in inform 7?
- How do I make a new action in Inform 7?
- How do you use a hyperlink to paste text without (in effect) pressing enter? (Flexible Windows, Inform 7)
- How do you indent text in a window using Flexible Windows by Jon Ingold? (Inform 7)
- In Inform 7, how do you create a text window using Flexible Windows by Jon Ingold?

...