首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在Inform7显示可用的房间?

如何在Inform7显示可用的房间?
EN

Stack Overflow用户
提问于 2017-02-12 00:04:33
回答 1查看 351关注 0票数 0

我正在Inform7上做我的第一次文字冒险,这让我抓狂。

我给三个房间下定义如下:

代码语言:javascript
复制
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"

因为很多人对玩这些游戏不熟悉,所以他们对床和浴室一无所知,因为游戏的开头是这样的:

代码语言:javascript
复制
Bedroom
It is pretty cold in here.
You see a bed.

我不想使用门,所以我需要使连接的房间为玩家可见。我该怎么做?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-02-12 17:55:36

通常的解决方案是只描述房间描述中的出口,比如Foon mentions in a comment。这样,你也可以增加一些色彩和变化的散文,而不是只是简单地列出事情。

一个简单的自动化解决方案是在房间描述之后打印出一个房间出口列表(改编自文档中的示例102 ):

代码语言:javascript
复制
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的扩展窗格的公共库中找到)。它负责记忆玩家熟悉的房间,所以当游戏开始时,你会看到“你可以从这里往北走和从这里往西走”,然后当玩家访问其他房间时,“你可以从这里向北到浴室,然后去厨房。”

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42182740

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档