I am currently still very new with Inform 7, and i have a quick question about making the player remember things.
I am currently using the extension “Inline Hyperlinks by Erik Temple” to provide a link for the possible room to enter and exit from. But as i continued to add rooms i realised that the links aren’t going to dynamically help the player that much if they only say “You can go [north]”. Of course that makes sense if the player is exploring, but if the player has already visited that room it should say “You can go [north] to [Previously visited room]”. The idea is to make it dynamic with a rule to simple stay [Exits] and then it states the Exits with the adjacent rooms names stated if visited before. I already now how to write it in without that, but making it dynamic would make things easier no doubt.
Is there any common way of doing this?
"You can go [link]east[end link][if the Antechamber is visited] to the Antechamber[end if]."
Or if you want to make it a bit more automatic at the cost of sometimes unnatural prose depending on the room names:
[code]To say to (place - a room): if the place is visited, say " to [the place]".
“You can go [link]east[end link][to the Antechamber].”[/code]
Note the lack of a space before the [to].
Another thing you can do is give the player a list of visited rooms:
Carry out taking inventory:
say "You have been to [the list of visited rooms]."
Thanks guys, exactly what i was looking for!
i have a last question though, since i think i could have figured it out with some luck if i knew that inform 7 actually knows what “a place” is. Is there like a glossary of words and values that inform 7 understands?
In this case, “place” is not a word that Inform understands, but one that is defined by this part of the rule:
To say to (place - a room)
This would also have worked:
To say to (dsagjkda - a room): if the dsagjkda is visited, say " to [the dsagjkda]".
Note that you would need to know that there is a kind called “room”. You can check out the kinds in the kinds tab of the index.
Important phrases that are defined by Inform itself and that you might want to use in these rules are: noun, second noun, actor and things like “number understood”. All of these are values that get filled as the parser parses the input the player types. So “examine chair” sets the actor to the player character and the noun to the chair.