Inform7:根据玩家的来源更改房间的描述
Inform7: Change a room's description depending on where the player came from
我是 Inform 的新手,看起来这应该不难做到,但我还没有找到方法。我想根据玩家的来源更改房间的描述。大致如下:
The Town Square is a room. "As you enter the small town square, [if yourself came from West]
the rising sun makes silhouettes of the roofs and spires to the East.[otherwise]your long
shadow strides before you as the Sun rises behind.[end if]"
解决此问题的最佳方法是什么?
我找到了一个合理的解决方案:
The last location is a room that varies.
Orientation is a direction that varies.
Before going to anywhere, now the last location is the location of the player.
After going to anywhere:
now orientation is the best route from the last location to the location, using even locked doors;
continue the action.
The Town Square is a room. "As you enter the small town square, [if orientation is east]
the rising Sun makes silhouettes of the roofs and spires to the East.[otherwise if orientation is west]
your long shadow strides before you as the Sun rises behind.[end if]"
"using even locked doors" 修改器确保即使门在玩家身后关闭并锁上也能正常工作。该解决方案确实假设玩家是通过可逆路线来的,但情况可能并非总是如此,例如如果玩家已经传送。
我是 Inform 的新手,看起来这应该不难做到,但我还没有找到方法。我想根据玩家的来源更改房间的描述。大致如下:
The Town Square is a room. "As you enter the small town square, [if yourself came from West]
the rising sun makes silhouettes of the roofs and spires to the East.[otherwise]your long
shadow strides before you as the Sun rises behind.[end if]"
解决此问题的最佳方法是什么?
我找到了一个合理的解决方案:
The last location is a room that varies.
Orientation is a direction that varies.
Before going to anywhere, now the last location is the location of the player.
After going to anywhere:
now orientation is the best route from the last location to the location, using even locked doors;
continue the action.
The Town Square is a room. "As you enter the small town square, [if orientation is east]
the rising Sun makes silhouettes of the roofs and spires to the East.[otherwise if orientation is west]
your long shadow strides before you as the Sun rises behind.[end if]"
"using even locked doors" 修改器确保即使门在玩家身后关闭并锁上也能正常工作。该解决方案确实假设玩家是通过可逆路线来的,但情况可能并非总是如此,例如如果玩家已经传送。