gpt4 book ai didi

inform7 - Inform 7 中的打印房间描述 "after going"规则

转载 作者:行者123 更新时间:2023-12-05 00:58:04 25 4
gpt4 key购买 nike

我有以下代码:

After going to room1:
if button1 is switched on:
say "You hear a loud noise in the distance!";

不幸的是,这会阻止打印房间描述。如果我加上“继续行动”;最后,输出是“你听到远处有很大的噪音!”在房间描述之前。我真的想先看一下房间描述。如果我加上“试试看;”作为第一行,它打破了简短/详细模型。我如何编码以获得以下输出?

(详细)
>e
Room1
This is a small room.
There is a letter here.
You hear a loud noise in the distance!

(简短,在第二次访问房间时)
>e
Room1
There is a letter here.
You hear a loud noise in the distance!

最佳答案

发生这种情况是因为“之后”规则在“报告”规则之前运行,并且房间描述由报告规则打印。所以你有几个选择来修复它:

  • 在您的后规则中打印房间描述。正如您所注意到的,“尝试寻找”打破了简短模式,因为它总是像玩家输入 LOOK 一样做出响应,但您可以使用另一个短语代替(在关于寻找的标准规则部分中提到):
    After going to room1:
    produce a room description with going spacing conventions;
    if button1 is switched on:
    say "You hear a loud noise in the distance!"
  • 从打印房间描述后运行的“报告进行中”规则打印您的消息:
    Last report going rule (this is the report loud noise in the distance rule):
    if the room gone to is room1 and button1 is switched on:
    say "You hear a loud noise in the distance!"
  • 从“每回合”规则打印您的消息,该规则在所有 Action 规则手册之后运行:
    Every turn when the player is in room1 and the player was not in room1:
    if button1 is switched on:
    say "You hear a loud noise in the distance!"
  • 关于inform7 - Inform 7 中的打印房间描述 "after going"规则,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33510721/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com