Hello! I’m newer to i7 and I’ve just started using the Questions extension by Michael Callaghan. It’s real neat, but I’m having some trouble getting it to work the way I want. I’m trying to create a questioning action, where the player can question a person, which in turn gives them some information about the person and then (if the person has not asked the player the question before), the person asks the player a question. Below is the basic code I’m using (without the flavor) and how I’m going about it. The problem I’m having is that once the player enters a response to the question (1 or 2), there is no response, meaning that the rule doesn’t seem to fire. This problem started after I entered the “if current question is “[line break]‘Question’”:” line to clarify which question I’m referring to (as I’d like there to be multiple questions eventually). It’s as if the current question isn’t recognized, and it’s a bit frustrating because the code LOOKS like it should make sense. How should I go about this? Thanks in advance, and I apologize for my inexperience.
Include Questions by Michael Callaghan.
Test is a room. TestPerson is a person in test.
Questioning is an action applying to one visible thing.
personaskedplayerquestion is a truth state that varies. personaskedplayerquestion is false.
Instead of questioning testperson:
say "[line break]testperson: 'Thanks for questioning me, here's my response.'";
if personaskedplayerquestion is false:
now current question is "[line break]'Question'";
now current question menu is {"Response one.", "Response two."};
ask a closed question, in menu mode;
follow the person answer rule;
stop the action.
A menu question rule (This is the person answer rule):
if current question is "[line break]'Question'":
if the number understood is 1:
say "[line break]testperson: 'Response to answer.'";
now personaskedplayerquestion is true;
if the number understood is 2:
say "[line break]testperson: 'Response to answer.'";
now personaskedplayerquestion is true;