Inform7:如何让 Inform7 在你进入一个房间时只显示一次文本,但每次进入该房间时都显示

Inform7: How do I make Inform7 display text only once when you enter a room but display every time you enter that room

我想知道您是否可以让 Inform7 显示类似 say "Welcome to the room!". 的内容 当你进入那个房间时只有一次。您之前键入的所有命令都不会重新触发此消息,但如果您离开并重新进入房间,它将再次显示。

我的想法是房间里有一个人,我想要一些问候语。 另外,如果可能的话,我可以在房间内打印任何其他内容之后打印出他们的文字吗?

您可以使用 new either/or property ("a new arrival" in this example) - set it in an after rule for the "going" action, and clear it in a general every turn rule. The greeting text can be displayed in another every turn rule - a more specific one to ensure that it runs before the general one that clears the property 记录演员是否刚刚到达房间 - 仅限于说问候语的人(本例中为 "The Greeter")都在正确房间的情况("The Greeting Room" 在这个例子中)并且能够看到一个新来的人:

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.