The wonderful Monkey island series has a nice way of talking to characters. You are presented with a couple of choices, and based on your answer (by clicking on one of them) other choices comes up. I'm sure you've all seen it. I'm thinking about the general structure behind such a speech engine. What would be a good way to design it? It's quite dynamic, since just a few choices (in the next set of questions) can change depending on your answer. Also, if you finish the talking in a certain way, something other than just "stop talking" will happen.
Please share your thoughts!