当我在Inform 7中尝试时,标题大小写功能不起作用

时间:2013-12-16 20:32:37

标签: 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? > ".;
    no.

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 command;
    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.

这就是我从中得到的东西:

  

你叫什么名字? > Squiggle Squiggleson   谢谢,波浪。

     

悲剧的孩子是Luke Tooze的互动小说   版本1 /序列号131216 / Inform 7 build 6G60(I6 / v6.32 lib 6 / 12N)SD

     波浪的卧室(在床上)   当你躺在你未整理的床上 - 盯着天花板 - 你意识到你应该   站起来面对这一天。

我尝试了很多变化,而且Inform每次都允许它,但它实际上并没有改变这种情况。请帮帮忙?

1 个答案:

答案 0 :(得分:1)

您设置了变量player's full name的大小写,但是根据仍然具有原始大小写的原始输入(player's command)设置了forename。将读取命令规则后的第二行更改为:

now the player's forename is word number 1 in the player's full name;