A bed is a kind of supporter. A bed is usually enterable.
A Key is a kind of thing.
The Firm Bed is a bed. A container called under is part of the Firm Bed. The Firm Bed is enterable. The Spare Key is a Key. The Spare Key is in the container under the Firm Bed.
Would be nice, but in game, I can’t look under the bed and see the key…
…Any ideas on how I should do this?
And since I want the player to be able to also sleep on the bed, I want it enterable, with the distinct difference of on and under the bed…
There’s been an idea going around that “the [kind]” should always generate a compiler error. It’s almost never what you mean.
Instead of “in the container…,” I think that line might work if you rewrite it like this:
When play begins:
Now the Spare Key is in a random container that is part of the Firm Bed.
A container called the space under the firm bed is part of the Firm Bed. The Firm Bed is enterable. The Spare Key is a Key. The Spare Key is in the space under the Firm Bed.
Oh, and you still have to redirect the “looking under” action:
Instead of looking under the firm bed:
Try searching the space under the firm bed.
Even better, I think there might be an Undersides extension you can use, which will handle redirections for you.
This is how I hid something under a bed, but I’m pretty new to Inform so I’m sure this is not the most elegant solution. The leash ends up “in” the room instead of “under” the bed but the end result is what I wanted.
[code]There is a blue leash. The description of the blue leash is “A blue leash with a metal clasp.” The blue leash can be found or lost. The blue leash is lost.
Your parents’ bed is in the Master Bedroom. Your parents’ bed is fixed in place and scenery. The description of your parents’ bed is “The queen-sized bed is made and doesn’t appear to have been slept in recently.”
Instead of looking under your parents’ bed when the blue leash is lost:
now the blue leash is found;
now the blue leash is in Master Bedroom;
say “Under the bed you find a blue leash.”;
increase the score by 1;[/code]