0

我已经将我的游戏设置为让玩家在开始时根据文档选择自己的名字,但是,用于将其放入标题大小写的行不起作用。每次我开始游戏时,玩家的名字都会以小写字母显示。

代码:

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 谢谢你,squiggle。

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

squiggle 的卧室(在床上) 当你躺在你未整理的床上——盯着天花板——你意识到你可能应该起床面对这一天。

我尝试了很多变体,Inform 每次都允许它,但它实际上并没有改变大小写。请帮忙?

4

1 回答 1

1

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

now the player's forename is word number 1 in the player's full name;
于 2013-12-16T20:38:31.660 回答