我正在使用Inform7创建一个发生在空间站上的游戏。我想要的是船首、船尾、左舵和右舵的方向,而不是标准的罗盘点。我已经使用understand as成功地重新定义了它们中的大多数。但是当涉及到使用's‘作为右舵的缩写,而不是南边时,我就被卡住了。
到目前为止,我拥有的代码如下所示。注意这一行:Understand "st" as starboard.这是一种变通方法,并不是我真正想要的。我只想用“s”作为右舵的缩写。如果我将这一行改为Understand "s" as starboard.,解释器仍然认为's‘的缩写可能是south,并用Which do you mean, the south or Starboard?回复。
我怎样才能让Inform7忘记南边而只把“%s”应用到右舵呢?
[ Shipboard Directions ]
Fore is a direction. The opposite of Fore is Aft.
Aft is a direction. The opposite of Aft is Fore.
Port is a direction. The opposite of Port is Starboard.
Starboard is a direction. The opposite of Starboard is Port.
Understand "f" as fore.
Understand "forward" as fore.
Understand "a" as aft.
Understand "p" as port.
Understand "st" as starboard.
Instead of going north, say "In space, there's no magnetic field, so there's no north. Also, no one can hear you scream in space. Not that you should be screaming. Well, there is that one room, but... oh, never mind."
Instead of going east, say "There's no magnetic field here. Compasses are useless. Maybe 'port' is what you meant."
Instead of going west, say "'Go west, young man.' Always with the going west. Obviously, they've never been in space. There's no 'west' in space. There's no I in team, either. There are port and starboard, however. But not in team... on the space station."
Instead of going south, say "South? There ain't no Mason-Dixon line on a space station. Did you mean starboard? You can use 'st' for starboard."发布于 2021-10-30 13:17:56
我曾在评论中建议过Understand the command "s" as something new.,但这行不通,因为"s“是south object的缩写,而不是动词。糟了!
相反,你可以使用you the player mean系统(第17.19节)
Does the player mean doing something with south: it is very unlikely.https://stackoverflow.com/questions/69771971
复制相似问题