0
好吧,我儘可能多地跟隨文檔,以便玩家爲他們的角色設置一個名字和性別,但是有一個問題。這實際上並不影響遊戲玩法(就我所見),但是因爲在玩家鍵入他/她的名字時,在性別部分添加'這不是我認識的動詞'這個消息顯示沒有理由。這在我加入性別選擇之前沒有發生。在Inform 7中出現了奇怪的角色創建事件
代碼:
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.
很抱歉,如果這是一個很大的代碼^ ^」
再次,這並沒有影響功能,但具有信息彈出僅僅是難看。