Hi dear Community,
I’m a new member, just started to make my own text adventure with Inform 7.
My Problem is this:
I made a variable to move a person with me, if i asked her to follow me before. Everything worked. But i cant the description of the room “Sprechzimmer” any more. And the person also don’t move.
This is the necessary Source-Code:
[Personen]
Ms Miller is a person. Ms Miller is in the Empfangsraum.
Mrs Johnson is a person. Mrs Johnson is in the Empfangsraum.
[Listen]
Table of Mrs Johnson Responses 01
Topic Response Index
"Bitte kommen Sie mit mir" "Aber natürlich, Dankeschön." "Bitte kommen Sie mit mir"
"Bitte warten Sie noch einen Moment" "Natürlich, ich werde warten." "Bitte warten Sie noch einen Moment"
[Variablen]
[1]
MrsJohnsonMove1 is a truth state that varies. MrsJohnsonMove1 is false. [Lässt Mrs Johnson ins Sprechzimmer gehen, wenn der Spieler ins Sprechzimmer geht und sie hereingebeten hat.]
[Befehle]
After going to Sprechzimmer:
if MrsJohnsonMove1 is true:
now Mrs Johnson is in Sprechzimmer;
now MrsJohnsonMove1 is false;
After asking Mrs Johnson about something:
if the topic understood is a topic listed in the Table of Mrs Johnson Responses 01:
say "[Response entry]";
After asking Mrs Johnson about something:
if the topic understood is "Bitte kommen Sie mit mir":
now MrsJohnsonMove1 is true;
continue the action;
I’m waiting for you answer!
Thx Ronimjan
P.S.: Please don’t be to hard with my English language. I’m from Germany. I’m trying my best, but there could be a few mistakes in grammar or spelling!
The issue is the “After going…” rule. “After” rules by default stop the processing of the action. In this case, that cuts off the rule that prints the description of the new room (which is a Report going rule).
There are three solutions I can think of right away:
–make it a Carry out going rule.
–add “continue the action” to the end of the After going rule–this would prevent the After rule from cutting off the action processing. (as you have done with your last “after asking…” rule.
The problem with these two approaches is that they would cause Mrs Johnson to be in the room when the description prints, so you would get “You can also see Mrs Johnson here” or something like that. You could fix that with something for the rule description that made the description of Mrs Johnson less awkward–perhaps a “rule for writing a paragraph about Mrs Johnson when the location is Sprechzimmer” or something like that.
–make an Every turn rule that moves Mrs Johnson and prints a message. You would want to check that the action that turn was going and the room gone to was Sprechzimmer.
Hope this is helpful!
The example in the manual (§3.25, ex 39) seems pretty close to what you describe as your goal.
Every turn:
if the location of Count Dracula is not the location of the player:
let the way be the best route from the location of Count Dracula to the location of the player, using doors;
try Count Dracula going the way;
just add your additional truth condition:
Every turn:
if the location of Mrs. Johnson is not the location of the player and MrsJohnsonMove1 is true:
let the way be the best route from the location of Mrs. Johnson to the location of the player, using doors;
try Mrs. Johnson going the way;
(Is there a reason you want to ask her to follow you each time? I’m coming at this from the Assassin’s Creed escort-mission perspective, but it would seem to make more sense to have MrsJohnsonMove1 be true until you ask her to warten ein Moment.)
No, this is the situation.
You are a detektive in your House waiting and Mrs. Johnson is a “customer” that is waiting for you. If you ask her “bitte kommen sie mit mir”, you ask her to come with you in your “workingroom”. And she should follow you…
Thx for you great help guys! I love people like you helping noobs like me ![:wink: :wink:](/images/emoji/twitter/wink.png?v=6)
I will try it tomorrow!
Ronimjan, I’m sorry, I don’t follow. What about the proposed solutions doesn’t work for what you need to accomplish?