当玩家角色进入他们所居住的孤儿院/寄宿学校的教职工室时,该玩家有两个回合才能听到经理的脚步声从大厅传来,他们被催促躲藏起来。我通过使用数字变量来做到这一点。在这一点上,我有另一个数字变量(通过仅使用 0 和 1 设置为真/假的东西)来控制是否尝试做任何事情,除了“隐藏”或“错误隐藏”给出响应“没有时间那,只是隐藏!问题是这样的:每当我开始游戏时,ANY ACTION 都会被拒绝并遇到“没有时间,只是隐藏!”。
代码:
NOTSITS is a number variable.
When play begins:
now NOTSITS is 0.
Every turn when the location is the Staffroom:
increase NOTSITS by 1.
Every turn when the location is the Staffroom:
if NOTSITS is 2:
now HYF is 1;
say "From the hall outside, you hear footsteps... Shit, that sounds like Rodger![paragraph break]HIDE!".
HYF is a number variable.
When play begins:
now HYF is 0.
Every turn :
if HYF is 1:
instead of doing anything other than hiding or hiding wrongly:
say "There's no time for that, just hide!".
Hiding is an action applying to nothing.
Understand "hide" as hiding.
Hiding wrongly is an action applying to one thing.
Understand "hide in [something]" as hiding wrongly.
Instead of hiding:
try entering the empty cupboard;
now HYF is 0.
Instead of hiding wrongly, say "Don't waste time with stupidity, just hide!"
请不要建议使用 Inform 7 自己的时间系统来解决这个问题。我试过了,这是一个比这更大的问题。