0

因此,我尝试使用 Michael Callaghan 的“问题”,但由于某种原因,我得到一个空白的命令提示符,并且我输入的所有内容都会收到相同的响应:“我不明白那句话。”

我一直在遵循手册,甚至从他的示例中复制和粘贴大量内容。

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.

我已经尝试过“问题”和“问题”。

4

1 回答 1

0

问题扩展有一个名为“芝麻开门”的长示例,涵盖了您想要的所有内容以及更多内容。通过删除不需要的内容应该很容易适应。该示例可以在 IDE 中查看,也可以在此处查看:http: //inform7.com/extensions/Michael%20Callaghan/Questions/doc_26.html

于 2013-12-22T13:37:45.300 回答