2013-12-19 30 views
0

我在我的智慧结束。我尝试了所有我能想到的方法,但无法在网上找到答案。我之前提出的一个问题得到了一个回答,那个回答的人说我没有告诉I7不要分析这条线。然后他建议我使用迈克尔卡拉汉的'问题',但这导致我的游戏在启动时崩溃(运行时错误)。我该如何告知Inform 7不要解析某些内容?

我发现了一种方法来完成这个,但我不能告诉I7以后恢复正常的解析。

我的代码:

"The Children of Tragedy" by Luke Tooze 

Chapter 1 - Beginning 

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 parsing is disabled; 
    say "The heat is unbearable.[paragraph break]You pull as hard as you can on her limp arm but the bookshelf is far too heavy.[line break]You barely notice as the fireman rips you from her and hoists you onto his shoulder."; 
    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. 

回答

0

也许你可以使用场景。例如:

Collect is a scene. Collect begins when play begins. 
The collected's state is a truth state that varies. 
The collected's state is usually false. 
Collect ends when the collected's state is true. 

Instead of looking during Collect: do nothing. 

Instead of collecting during Collect: 
    say "You have collected!"; 
    now the connected's state is true.