Hello. I found this forum looking for places where I can get help for things relating to Inform 7, as I’m having trouble coding a specific situation I want the player to start in. The player is supposed to start in a container; in this instance, a toybox inside of a room. I want it to print the fact that the player is in a container in a room, except for two things. One, I want it to print the text that I input, after stating “room name (in toybox)”. Two, I do not want it to automatically say “In toybox you see x and y.” Currently, the way I have it set up is:
Andy's Room is a room. toybox is a container in Andy's Room. Player is in toybox.
After printing the name of Andy's Room, say "[text]".
But the way this prints out is awkward:
In toybox you can see x and y.[/code]
To put it in short, I want the “in toybox” bit to appear next to Andy’s Room, and I don’t want “In toybox you can see…” to appear. What are some ways I can accomplish this?
For the first question, one way to make sure that the [text] appears right after the room description heading is to use the trick in the “Hover” example from the documentation.
[code]The post heading text rule is listed before the room description body text rule in the carry out looking rulebook.
This is the post heading text rule:
if the player is in the toybox:
I’m not sure if this is the best way, but it works.
And the second question’s answer:
Rule for printing the locale description of the toybox:
The second bit worked, thank you. I’m still having trouble with the first one. I’m still struggling with the first one; I pasted the code in exactly as it’s written and it’s still only printing out “Andy’s Room (in toybox)”, with no additional text. Additionally, I’m having trouble creating a character that is actually a two people that the player talks to at once, written as “[Person A] and [Person B]”. I suspect the “and” is throwing it for a loop. Should I just split them up, or is there a way around this?
For the room description question, can you post how you want it look?
For the two people thing, you can try this:
A person called Tweedledee and Tweedledum is in Andy's Room. Tweedledee and Tweedledum is plural-named.
(That last one is just to make sure that if it will print “Tweedledee and Tweedledum are here” rather than “is here” if something like that comes up.)
Another way to do this is to give the thing a different internal name than the printed name:
Tweedledee-and-Tweedledum is a person in Andy's Room. The printed name of Tweedledee-and-Tweedledum is "Tweedledee and Tweedledum". Tweedledee-and-Tweedledum is plural-named. Understand "Tweedledee" and "Tweedledum" and "Tweedledee and Tweedledum" as Tweedledee-and-Tweedledum.
And then every time you refer to them in the source code you’d have to type Tweedledee-and-Tweedledum with the dashes.