How can i create dialog in inform 7? Iwent down the manual on reading and talking and so on. I tried this:
After telling dr huberlot about hello, say “Huberlot: Good evening, JW.”
But when i test run it and type “tel dr huberlot about “hello”” or "say “hello” to dr huberlot"2 it says “there is no reply”.
If you want to write a rule for an action applying to literal text, you need to put that text (in this case, the word “hello”) in quotes.
On the other hand, the in - game parser doesn’t want quotes. Players need to type “tell dr huberlot about hello” (no quotes) to get a correct response for the telling it about action.
This is covered by a different action: answering it that. You can find this out by typing “actions” at the command prompt.
An example probably explains this more clearly:
[code]Lab is a room.
Sam is man in the lab.
After telling sam about “hello”, say “This is the response for telling Sam about ‘hello.’”.
After answering sam that “hello”, say “This is the response for answering Sam that ‘hello.’”
Test me with “tell sam about hello / say hello to sam / sam, hello / actions / tell sam about hello / say hello to sam / sam, hello”.[/code]
Edited to add: I wouldn’t have used after rules for this, but I wanted to make the code as easy to compare with your original as possible. I would have de-listed the standard report rules for these actions and created a new set of either carry out or report rules to cover both the expected responses and a default response. It really depends upon how complicated the conversation system is going to be. The are some example in the Recipe Book as well as various extensions for conversations on the I7 website.
I would strongly recommend checking out some of the conversation-related extensions; they can save you a lot of work as ooposed to reinventing the wheel.