首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Inform7中角色创建的奇怪情况

Inform7中角色创建的奇怪情况
EN

Stack Overflow用户
提问于 2013-12-17 07:41:01
回答 1查看 444关注 0票数 0

好的,我正在尽可能的按照文档来允许玩家为他们的角色设置一个名字和性别,但是有一个问题。这实际上不会影响游戏的玩法(据我所见),但自从在性别部分添加了‘这不是一个动词,我认识’的消息似乎没有任何理由,只要玩家输入他/她的名字。在我添加性别选择之前,这并没有发生。

代码:

代码语言:javascript
复制
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.

如果代码太多,很抱歉^.^‘

再说一次,这并没有影响功能,但弹出消息只是难看而已。

EN

回答 1

Stack Overflow用户

发布于 2013-12-18 18:47:34

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

我建议您只使用扩展Question by Michael Callaghan

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20623210

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档