6

如果我得到一个好的答案,我会吃掉我的帽子......我怀疑虽然我是 Inform 7 的初学者,而且我猜这并不难,但这里可能没有多少人熟悉 Inform 7 的人。仍然没有冒险...

我正在尝试创建对“拉”动作的自定义响应。不幸的是,我认为“拉”动作通常不需要第二个名词。所以我正在尝试这样的事情:

The nails are some things in the Foyer.  The nails are scenery.
Instead of pulling the nails:
    If the second noun is nothing:
        say "How?  Are you going to pull the nails with your teeth?";
    otherwise:
        say "I don't think that's going to do the job."

但是,虽然这可以编译,并且第一部分有效,但从未调用过“我不认为......”部分......解释器只是回应“我只理解你想要拔钉子。” 我是否必须为此创建自己的自定义操作?覆盖标准拉动操作?我是否错过了一些简单的东西,可以让我让它工作?

4

1 回答 1

8

您是否将标准规则中的“拉”扩展为接受第二个名词?据我了解(*),标准的“拉”不知道“与”。我猜大概是这样的:

Pulling it with is an action applying to two things.
Understand "pull [something] with [something preferably held]" as pulling it with.

Instead of pulling the nails:
    say "How?  Are you going to pull the nails with your teeth?";
Instead of pulling the nails with something:
    say "I don't think that's going to do the job."

*:警告:我完全不明白,也不知道我在说什么。:-) 我已经避免将 Inform 的第 7 版视为某种乔姆斯基式的噩梦......

于 2010-04-29T20:05:10.760 回答