绝对不是最好的方法,但我有类似的问题,我最终迭代了你创建的方向列表,并将每个房间添加到房间列表,然后可以说:
nLooking is a number that varies. nLooking is 0.
After looking:
now nLooking is 1;
let accessibleRooms be a list of rooms;
let pDirections be list of viable directions;
repeat with dirToLookAt running through pDirections:
try silently going dirToLookAt;
if rule succeeded:
add the location of the player to accessibleRooms;
try silently going the opposite of dirToLookAt;
now nLooking is 0;
say "You can go to [accessibleRooms].".
Before going through a locked door when nLooking is 1:
stop the action.
我用nLooking阻止的输出
(第一开口门)
好像被锁定。
当寻找房间可以访问。
if rule succeeded
检查palyer是否能够去房间。如果是这种情况,玩家进入的房间将被添加到列表中,并且玩家将被移回他来自的地方。
这只适用于没有制作混沌地图的情况下,在相反的方向上移动来自哪里并不意味着同一个房间内的地图。人可能只需将播放器早在他从来到房间......
晚的答案,但我知道,也许它可以帮助人们用同样的问题:)
非常感谢,我会在我的下一个测试游戏。我通过提到通向其他房间的门来解决这个问题。不是很好,但它可以用更艺术的方式使用;) – 18zehn