Hi peeps, I’m pretty new to Inform 7 - started trying to into it a few days ago.
I have the player sitting in a room with a blindfold on. There are objects in the room but I don’t want to mention them to the player until they take the blindfold off. Can anyone suggest how to stop Inform from automatically describing the objects in the room, when the player is wearing the blindfold?
You could start by making the room dark when the player is wearing the blindfold (see ch. 3.15. in the manual). The player can’t see the room description or interact with the objects while the room is dark.
Might not be convenient if you want to use, say, a blindfold and a candle. A lit object in a dark room…
The player is wearing a blindfold.
Instead of looking when the player is wearing a blindfold, say "You can't see a dern thing."
Judging from the way you’ve started it, perhaps:
The player is on the chair. The player is wearing the rope.
Instead of doing something when the player is wearing the rope, say "You're tied to this chair."
Instead of cutting the rope:
remove the rope from play;
say "You cut the ropes.".
Not sure if this is at all relevant. Something you may or may not want to play around with, and a look at the structure for rules (one of the bits I’m currently learning, and I’m a fair novice).
Note that inform already knows what “cutting” is. If you want to define new actions (such as untying) you need to tell them that untying is an action, and to understand “untie [something]” as untying.
I assumed the OP would want to stop the player from manipulating the objects as well. If you only suppress the room description the player can still do whatever they want to the objects in the room, including examining them or using TAKE ALL to find out what objects there are.
Unless the player is supposed to just wait around for someone else to take the blindfold off, you’ll want them to be able to do something. I don’t like just restricting the actions, because there are plenty of things you ought to be able to do, even while tied up and blindfolded (starting with “sing”). Making the room dark is much better. There are probably plenty of ways to make the room dark even if there’s a light source in it (and the OP didn’t say there was a light source; if there isn’t, so much the easier).
Hmm. Good points from both of you, but I still like the intuitive “You have a blindfold so you can’t see.” If it were mine, I’d probably work from there. Maybe with an “instead of doing something when the player is wearing the blindfold” with a list of exceptions.
I think I know what you’re getting at - you don’t want to say that the room is dark if it’s not “really” dark, the player just has a blindfold on. You can do that with a dark room and just change the texts that are displayed, so instead of the game saying “It is pitch dark, and you can’t see a thing” you can make it say “You have a blindfold so you can’t see.” The effect would be exactly the same and the player could not tell which technique you’ve used, but using the unlit room would be much, much easier to code and maintain (you wouldn’t have to list allowed verbs by hand and you wouldn’t need a potentially complex code to disallow TAKE ALL for example).