I Need Basic Inform 7 Help.

So I’m new. Somebody explain why this isn’t working, please? I keep changing it to try again, and ONE key works but the other doesn’t, why?

Rooms by default can’t have the property “locked” or “lockable” or “openable.” If you want this to compile, you need to explicitly assign those properties to rooms:

A room can be locked. A room can be lockable. A room can be openable.

However, that’s probably not what you want–because it won’t have any effect when the room is locked. What you probably want is a locked door between rooms 1 and 2. (Doors have all the relevant properties built in.) Something like:

Room 2 is a room. The wooden door is a door. The wooden door is west of Room 1 and east of Room 2. The room key unlocks the wooden door.

Thank you so much~ im gonna have to figure this place out. lol. im trying to get in to this whole text-based thing. Gaming and Writing is my passion and this is the perfect way to combine them. So if you have any tips, please do tell me!

I’ve found the best way to learn Inform 7 is to actually read the “Writing with Inform 7” manual inside the IDE on the Documentation tab. I’m not at all just bluntly saying RTFM, but reading the manual inside the program means you can instantly transfer the examples into the IDE (there are buttons to do this), run them to see how they work, and experiment as you go.

You should definitely try to make time to get through the entire “Writing with Inform” document at least once in sessions that are manageable to you. This will give you a whole lot of basic information and overview of what is possible and how to write your source text. Then when you’re done, the other document “The Recipe Book” is packed with specific examples of how to do common things authors want, like how to create monetary systems, how to jump the player into different characters, how to create playable flashback scenes, how to make a video camera that records what people in the room are doing. The Recipe Book is really neat and inspirational to read in full but is designed to be referred to the way you would a recipe book to get a starting idea of how to create complex implementations.

Inform 7 is very interpretive in that there are hundreds of ways to do the same types of things. You’ll develop a style, but here’s my interpretation of what can be done with your original example.

[rant=code][code]Room 1 is a room. “You find yourself in Room 1. There’s nothing particularly special about it, except that it is the [italic type]first one[roman type].”

a battered old wooden desk is a supporter in Room 1. “A battered old wooden desk has been shoved into one corner of the room.” The description is “It’s a well-used wooden desk. It has one drawer.”

An aluminum soda can is an openable, closed container. It is on wooden desk. The description of aluminum soda can is “It’s red and white, mimicking the design of a popular brand, but the lettering printed on it is in a foreign language[if we have taken soda can and blue key is in soda can]. It rattles weirdly when you pick it up.”

a desk drawer is a container. It is lockable and locked. It is part of the battered old wooden desk.

Instead of opening wooden desk, try opening desk drawer.
Instead of unlocking wooden desk with something, try unlocking desk drawer with the second noun.

a postage stamp is in desk drawer. The description of the postage stamp is "It’s a 15-cent stamp. What’s this good for nowadays? There’s a picture of a[one of][or]n open[stopping] blue door on it[first time].

You hear a click from the blue door. The one in the room, not the one on the stamp. Odd[only]."

Carry out examining postage stamp when blue door is locked:
now blue door is unlocked;

some lettering is part of can. The description is “You can’t read the language of the lettering on the soda can, but it seems to be very enthusiastic. Some of the lettering seems to be upside down.”. Understand “upside down” and “upside-down” as lettering.

a blue key is in aluminum soda can. It unlocks the desk drawer. The description is “It’s inscribed with the word [italic type]silencio[roman type].”

Carry out taking aluminum soda can:
if blue key is in soda can:
say “The can is oddly light, as if devoid of liquid, and you hear a clinking noise.”

After opening soda can for the first time:
say “You pop the top, but there is no fizzing sound nor pressure release. But something is rattling inside…”

Check taking blue key:
if blue key is in soda can:
say “You can’t get your fingers inside, unfortunately.” instead.

Check inserting something into soda can:
say “You don’t think [the noun] will fit inside, and even if [they] did, you’d never get it out again.” instead.

Instead of closing soda can:
say “It’s open forever now.”

Understand “turn [something] over” and “turn [something] upside down” and “turn [something] upside-down” as turning.

After turning the soda can when soda can is closed:
if blue key is in soda can:
say “You hear something rattling in the can.”

After turning soda can when blue key is in soda can and soda can is open:
say “Aha! A blue key falls out of the soda can!”;
now blue key is in the location of soda can.

Shaking is an action applying to one touchable thing. Understand “shake [something]” and “rattle [something]” as shaking.

Check shaking:
if the noun is not carried by the player:
say “You can only shake something if you are holding it.” instead.

Report shaking:
say “You give [the noun] a vigorous shake, but nothing exciting happens.”

After shaking soda can when blue key is in soda can:
say “It rattles. There’s definitely something inside.”

Room 2 is a room. “Well, this is the second room. Except for the black and white zigzag floor and red burgundy curtains and cool jazz music, it doesn’t seem very special either.”

Every turn when the location is Room 2:
end the story saying “You could really use some coffee…”

A blue door is a door. It is lockable and locked. “A blue door leads [if the location is Room 1]north[otherwise]south[end if].” .

The description of blue door is “The door is painted blue. You notice the blue paint almost completely conceals some writing on the door.”

Blue door is north of room 1 and south of room 2.

Some writing is part of blue door. The description is “You can barely make out the faint letters that have been painted over, but from what you can tell, it appears to spell out the word SILENCIO.”