在Inform 7中创建字符时出现奇怪的情况

时间:2013-12-16 23:41:01

标签: inform7

好的,所以我正在关注文档,方便玩家为角色设置名称和性别但是有一个问题。这实际上并没有影响游戏玩法(据我所知)但是由于在性别部分添加了“我不认识的动词”,一旦玩家输入他/她的名字就会出现看似没有理由的消息。在我加入性别选择之前,这种情况没有发生。

代码:

The player's forename is an indexed text that varies. The player's full name is an indexed text that varies.

When play begins:
    now the command prompt is "What is your name? > ".

To decide whether collecting names:
    if the command prompt is "What is your name? > ", yes;
    no.

After reading a command when collecting names:
    now the player's full name is "[the player's command in title case]";
    now the player's forename is word number 1 in the player's full name;
    now the command prompt is "Are you male or female? > ".

Gender is a kind of value. The genders are masculine, feminine, and unknown. Understand "male", "man", "boy" or "m" as masculine. Understand "female", "woman", "girl" or "f" as feminine.

A person has a gender. The gender of the player is unknown.

To decide whether the gender of the player is unknown:
    if the command prompt is "Are you male or female? > ", yes;
    no.

After reading a command when the gender of the player is unknown:
    if the player's command includes "[gender]":
        now the gender of the player is the gender understood;
        if the gender of the player is masculine, now the player is male;
        if the gender of the player is feminine, now the player is female;
        now the command prompt is "> ";
        say "Thank you, [player's forename].[paragraph break]";
        say "[banner text]";
        move the player to the bed;
        reject the player's command.

Instead of looking when collecting names: do nothing.
Rule for printing the banner text when collecting names: do nothing.
Rule for constructing the status line when collecting names: do nothing.
Instead of looking when the gender of the player is unknown: do nothing.
Rule for printing the banner text when the gender of the player is unknown: do nothing.
Rule for constructing the status line when the gender of the player is unknown: do nothing.

很抱歉,如果这是很多代码^。^'

同样,这并未影响功能,但弹出该消息只是不雅观。

1 个答案:

答案 0 :(得分:0)

我认为问题在于即使您正在访问第一个输入的文本在阅读命令规则之后,您也没有告诉游戏不去解析他们输入的内容。

我建议你只使用扩展程序Question by Michael Callaghan