Locking a door in Inform7 works in one case but not another -


hoping there active on tag issue problem regarding inform7 here. use language in college in contact structure of splicing projects , tasks in group.

the current task unlock door when button pressed , close after 1 turn. code use following:

dooropen number varies. dooropen 0. [ = false]  tuerk door. south of flur006r , north of r028a. locked. tbutton_flur in flur006r. tbutton_flur can pushed. instead of pushing tbutton_flur:     tuerk unlocked;     "die tür öffnet sich";     dooropen 2;  every turn when dooropen 1:     dooropen 0;     tuerk locked;     "door closes!".  every turn when dooropen 2:     decrement dooropen.  tbutton_raum in r028a. tbutton_raum can pushed. instead of pushing tbutton_raum:     tuerk unlocked;     "door opens!";     dooropen 2; 

where use dooropen attribute check whether door open or not. problem can push button, go opened room, says door beeing closed, can go out of room without problems , appears unlocked on.

on other hand have other code:

tuersit door. south of r024 , north of flur005r. locked.

the sicherheitsausweis unlocks tuersit.

before going r024:     if player holding sicherheitsausweis:         tuersit unlocked;         "der sicherheitsausweis hat die tür entsperrt";     otherwise:         tuersit locked. 

where now doorname locked works totally fine.

is there did incorrectly? tried create hidden keys have unlocked because thought problem was, seems unable lock door.

any appreciated!

so appears 1 first has close door, did not test on other door. so

now door closed; door locked. 

works fine.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -