通知7:根据库存中是否有特定物品来提取物品

bea*_*akr 8 inform7

我正在使用Inform 7进行冒险.在冒险中,你可以拿起一块芯片.如果您的库存中有芯片,我希望能够拿起一台称为袖珍电脑的东西.把它放在可能的通知句中:

If chip is in the inventory, take pocket computer.
Run Code Online (Sandbox Code Playgroud)

Rob*_*ker 8

我认为你最好通过另一种方式去做.毕竟,通常可以拾取便携式物体; 你似乎想做的是如果他们没有芯片就要防止它.我觉得这样的事情可以奏效:

Instead of taking the pocket computer when the player does not have the chip:
say "You need the chip first!"
Run Code Online (Sandbox Code Playgroud)

但是,我会考虑阻止玩家捡起它是否合理.袖珍计算机是否以某种方式固定到位,芯片需要解锁吗?或者只是计算机在拥有芯片之前没用?如果是后者,我建议你仍然允许玩家捡起它,因为在现实生活中没有什么能阻止他们这样做.它打破沉浸,以防止合理的行动,因为它还没有用.