所以我试图使用迈克尔卡拉汉的"问题",但由于某种原因,我得到一个空白的命令提示符,我输入的所有内容都收到相同的响应:"我不明白这句话。
我一直在遵循手册,甚至从他的例子中复制和粘贴了大量内容。
Include questions by Michael Callaghan.
Getting to know you is a room.
The player is in Getting to know you.
Data is a kind of value. The data are complete, name and sex.
Gathering is a scene. Gathering begins when the location is Getting to know you.
Gathering ends when stage is complete.
Stage is data that varies.
When Gathering begins:
now stage is sex.
Every turn during gathering:
if stage is sex:
now the current question is "Are you male or female?";
now the current prompt is "> ";
ask a closed question, in gender mode;
if stage is name:
now the current question is "What is your name?";
now the current prompt is "> ";
now punctuation removal is false;
ask an open question, in text mode;
The player's name is an indexed text that varies.
The player's forename is an indexed text that varies.
The player's sex is a gender that varies.
Understand "male" or "boy" as masculine.
Understand "girl" or "female" as feminine.
A gender question rule (this is the gather gender rule):
if gathering is happening and stage is sex:
now the player's sex is the gender understood;
now stage is name;
exit.
A text question rule (this is the gather name rule):
if gathering is happening and stage is name:
now the player's name is the current answer;
now the player's forename is word number 1 in the current answer;
say "Thank you, [player's forename].";
now stage is complete;
now the player is on the bed;
exit.
我尝试了"问题"和"问题"。
问题扩展有一个很长的例子,叫做"芝麻开门",它涵盖了你想要的所有内容,甚至更多。通过删除不需要的东西来适应应该很容易。可以在 IDE 中查看该示例,也可以在此处查看:http://inform7.com/extensions/Michael%20Callaghan/Questions/doc_26.html