我想知道你是否可以让Inform7显示类似say "Welcome to the room!".
只有一次当你进入那个房间时。您键入的所有上述命令都不会重新触发此消息,但如果您离开并重新进入房间,它将再次显示。
这个想法是,我在房间里有一个人,我想有一些问候短信。 另外,如果可能的话,我可以在房间里打印任何其他内容后打印出他们的文本吗?
您可以使用新的 Can/or 属性(在本例中为"新到达"(记录 actor 是否刚刚到达房间 - 在"进行"操作的 after 规则中设置它,并在常规的每回合规则中清除它。问候语文本可以显示在另一个每回合规则中 - 一个更具体的规则,以确保它在清除属性的常规规则之前运行 - 仅限于说问候语的人(在本例中为"接待员"(既在正确的房间(在本例中为"迎宾室"(又能够看到新来的人的情况:
A person can be a new arrival.
A person is usually not a new arrival.
After going:
now the actor is a new arrival;
continue the action.
Every turn when the Greeter is in the Greeting Room and the Greeter can see a new arrival person:
if the player can see the Greeter:
say "Welcome to the Greeting Room![line break]".
Every turn:
repeat with newcomer running through new arrival people:
now the newcomer is not a new arrival.