Question keeps looping endlessly / Action without rule

Hello again,

thought I’d be fine, but here I run into another problem. :confused:

I guess to answer this question one will need a bit experience with the Extension “Questions by Michael Callaghan”.

I am trying to establish a conversation and have been fairly successful. Basically it is just one person talking and asking the player a number of questions. The conversation begins when entering a specific room.

Sounds simple. Most likely it is. I chose a complicated path, most likely. This is what I did in a simplified example:

[code]
Include Questions by Michael Callaghan

The Bedroom is a room. “It is ridiculously boring.”

A question is a kind.
A question is either answered or unanswered.
A question is usually unanswered.

Question1 is a question.
Question2 is a question.

Every turn:
If player is in the Bedroom:
If Question1 is unanswered:
Now the current question is “How much is 1 x 12?”;
Now current question menu is { “1”, “12”, “24” };
Ask a closed question, in menu mode;
Otherwise if Question2 is unanswered:
Now the current question is “How much is 2 x 12?”;
Ask a closed question, in text mode.

A menu question rule:
if the current question is “How much is 1 x 12?”:
If the number understood is 2:
Increase Score by 5;
Say “You are a math genius!”;
Now Question1 is answered.

A text question rule:
if the current question is “How much is 2 x 12?”:
If the current answer is “24”:
Increase Score by 5;
Say “You are unbeatably brilliant!!!”;
Now Question2 is answered.[/code]

My problem here is that I cannot get past the text question. The line “You are unbeatably brilliant!!!” is shown, but then the game gives me the prompt for answering the question again.

How can I exit the loop?

Also: Is there a more elegant way to trigger the conversation? At the moment I use the “Every turn” rule, but what if I want to do that later and there is no action I could bind a rule (like “after”, “before” or “instead”) to?

This also applies if I want to “Say” something, but have no rule I could put the “If” clause in. What can be done?

Any ideas?

Thanks in advance for your input.

BiB

Have you considered using Simple Chat by Mark Tilford?

It has recently been updated to fix a conflict with the latest I7 library. The update is here:

http://pastebin.com/4ycjZJ52

This is actually a good idea. The downside of this is extension is that it only allows for a menu based chat.

Every now and then I need an answer in open text. I could change all answers to multiple choice, but I’d rather not.

I will use it if nothing else comes up…

Thanks for the tip! :slight_smile:

BiB

BigBonsai, the problem with asking questions about extensions on the forum is that folks don’t necessarily have much experience with a particular extension. So, you might try contacting the author of Questions directly. If his email address isn’t listed in the extension, I can PM you his email address.

–Erik

Yes, I figured that.

Sure, PM me. Then I can send the author a link to this thread. See what happens. :wink: Thanks.

BiB

The author was very kind and has replied.

His (working!) solution is to add “Exit;” to the respective rules. This will end the question.

I also had the problem that when asking a number of questions consecutively, the score count would not be increased, since time did not advance. To solve this, the lines

Follow the notify score changes rule; Follow the advance time rule;
must be added as well.

So this is what the code will look like corrected:

A text question rule: if the current question is "How much is 2 x 12?": If the current answer is "24": Increase Score by 5; Say "You are unbeatably brilliant!!!"; Follow the advance time rule; Follow the notify score changes rule; Exit; Now Question2 is answered.

Thanks to the author! :sunglasses:

BiB