programming doors in inform
13 Jul 1995 21:32:57 GMT
Nearby Grate "steel grate"
with name "grate" "lock" "gate" "grille" "metal" "strong"
"steel" "grating",
description "It just looks like a grate mounted in concrete.",
with_key set_of_keys,
door_dir
[; if (location==Below_The_Grate) return u_to; return d_to;],
door_to
[; if (location==Below_The_Grate) return Outside_Grate;
return Below_The_Grate;],
describe
[; if (self has open) "^The grate stands open.";
if (self hasnt locked) "^The grate is unlocked but shut.";
rtrue;
],
found_in Below_The_Grate Outside_Grate
has static door openable lockable locked;
The above is the code to the Grating/Door described in the
Designer's manual. I tried it and it works fine. What if I don't
want those "describe" messages each turn? I removed them & gave
the grate the "concealed" attribute. Suddenly, I can`t pass
through it anymore. Removed "concealed" again and it works fine.
Why is this? What am I missing here?
I saw some code in the VerbLib.h and it checked if the door-object
had "concealed". What is this for?