我正在Inform7上做我的第一次文字冒险,这让我抓狂。
我给三个房间下定义如下:
The house is a region.
The bedroom and the bathroom and the kitchen are in the house.
The bathroom is north of the bedroom.
The kitchen is west of the bedroom.
The bed is a supporter in the bedroom.
Bedroom is a room. It is neuter. "It is pretty cold in here"因为很多人对玩这些游戏不熟悉,所以他们对床和浴室一无所知,因为游戏的开头是这样的:
Bedroom
It is pretty cold in here.
You see a bed.我不想使用门,所以我需要使连接的房间为玩家可见。我该怎么做?
发布于 2017-02-12 17:55:36
通常的解决方案是只描述房间描述中的出口,比如Foon mentions in a comment。这样,你也可以增加一些色彩和变化的散文,而不是只是简单地列出事情。
一个简单的自动化解决方案是在房间描述之后打印出一个房间出口列表(改编自文档中的示例102 ):
Definition: a direction (called thataway) is viable if the room
thataway from the location is a room.
After looking:
say "You can go [list of viable directions] from here."一个更精细的方法是安装并包含Gavin的扩展出口Lister (在IDE的扩展窗格的公共库中找到)。它负责记忆玩家熟悉的房间,所以当游戏开始时,你会看到“你可以从这里往北走和从这里往西走”,然后当玩家访问其他房间时,“你可以从这里向北到浴室,然后去厨房。”
https://stackoverflow.com/questions/42182740
复制相似问题