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?

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.

This site is now closed.
As of 1st November 2015, this site is a read-only archive. For more information see the intfiction forum post

Welcome to IF Answers, a site for questions and answers about Interactive Fiction.

Technical questions about interactive fiction development tools such as Inform, Twine, Quest, QuestKit, Squiffy, Adrift, TADS etc. are all on-topic here.

Non-technical questions about interactive fiction are also on-topic. These questions could be about general IF design, specific games, entering the IF Comp etc.
...