我在Inform 7的两个房间之间有一个“门”(旋转门),我希望玩家必须跳过它。
我有:
The turnstile is inside of the Library. The turnstile is a door.
The turnstile is locked and closed and openable.
The turnstile can be jumped over.
Instead of jumping turnstile:
say "You jumped over the turnstile and ran into the library";
now the player is in Collab Room;
Run Code Online (Sandbox Code Playgroud)
但是我得到了错误:
问题。您写了“代替跳闸”,它似乎引入了仅在动作为“跳闸”时才生效的规则。但这对于描述动作没有意义。我无法将此规则放入任何规则手册中。
请参见手册:7.1> 7.1。动作
我检查了该部分,并用谷歌搜索了一堆,没有运气。任何帮助表示赞赏!
标准规则中的跳跃动作不接受名词。您必须定义一个新动作。
Jumping over is an action applying to one thing.
Understand "jump [something]" and "jump over [something]" as jumping over.
Check jumping over:
say "That seemed unnecessary." instead.
Instead of jumping over the turnstile:
say "You jumped over the turnstile and ran into the library.";
now the player is in Collab Room;
Run Code Online (Sandbox Code Playgroud)
附带说明一下,The turnstile can be jumped over它本身并不会做任何事情:它可以用作自定义规则逻辑的一部分,但是Inform实际上并不了解英语,因此不会自动接受此类说明。