Ok so I think a 3am haze has hit me. I am making some scenery for my IF and I have defined a pilot’s cockpit as scenery. However I know that someone will try to enter the cockpit and I don’t want that. I just want it to examin instead. Will the following code work in i7?
The cockpit is scenery in the Port. “You examine the cockpit of the closest loader. Inside is an array of controls, dials, switches and displays, which are all in a powered down state. Climbing into the faux leather pilot’s seat you thumb the master power switch but nothing happens. The loader seems to have completely drained its fuel cells.” Understand “loader cockpit” or “loaders cockpit” or “bipedal loader cockpit” or “bipedal loaders cockpit” or “inactive loaders cockpit” or “inactive loader cockpit” or “Yugimashu loader cockpit” or “Yugimashu loaders cockpit” as cockpit. Instead of entering the cockpit: examine cockpit.
I did consider working out how to make it a enterable container. However I feel simply making the game examin the cockpit, I have no real ingame need for it to be entered as it is literally just a set piece, would be easier.
Edit:
BTW I know the description is a bit poor. I am gonna clean that up when I get round to it Also I am on my break at work so I am unable to test this code out until I get chance to use my PC.
First, you don’t have to specify every permutation of words like that. This covers it:
Understand “inactive”, “loader”, “loaders”, “bipedal”, “yugimashu” as the cockpit.
Second, when you give a naked string after an object like that, you’re specifying how it appears in the room description. But scenery never appears in the room description. So you want “The description is …”.
Third, it’s “try examining cockpit”.
Fourth, you could have found out whether it works a lot faster by trying it.
Thanks. I am at work so I couldn’t test it even if I wanted to plus I tend to work blocks of shifts so it could be the weekend before I get a real chance to sit down and try it.
But I figured I had done something wrong with it. It didn’t look completely right. So thanks for clarifying it for me
Actually, for scenery this does provide an ‘examine’ description. I guess it’s allowed precisely because scenery never appears in the room description.
The line
The Ramp is a room.
has to come before the line
The Cockpit is scenery in the Ramp.
in your source text (or Inform won’t know yet that “the Ramp” is a room that anything can be in when it first tries to compile the definition of the cockpit).
You don’t say “Instead of enter the cockpit” either.
Note that there’s a distinction between actions and commands. When the player types EXAMINE COCKPIT, the examining action is triggered. The “try” phrase doesn’t trigger a command (it’s not “try typing “EXAMINE COCKPIT” at the prompt”) but an action.