Examin instead of enter.

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 :wink: 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. :slight_smile:

Thanks. :slight_smile: I am at work so I couldn’t test it even if I wanted to :frowning: 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 :slight_smile:

When you’re on the go and want to try something you can use playfic.com.

Oh wow cheers. I was going to ask if there were any online systems.

Actually, for scenery this does provide an ‘examine’ description. I guess it’s allowed precisely because scenery never appears in the room description.

Ha, got me there. That’s a special case in the compiler that I never knew about.

does a little jig Bwahahahaha! :smiley:

Ok I have tried that code in Inform 7 directly and I can’t get it to work. I have a room called the ramp and the cockpit is scenery.

I am trying this:

The Cockpit is scenery in the Ramp.

But I am getting this error.

However I am using it as I have seen it in the manual. It’s driving me nuts.

edit =

ARGH! even using the one that is in the manual (The gnarled old oak tree is scenery in the Orchard. ) is kicking out the same error.

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).

Thanks. I didn’t realise that it had to go into the room container.

Next silly questions is this:

Instead of entering the cockpit: try examine cockpit.

It throws this up.

I have also tried look at cockpit and x cockpit.

It’s “try examining cockpit”.

Can I ask why it’s accepting examining and not examine? This might be a daft question but I am new to inform 7 and I want to know what my mistakes are :slight_smile:

In the language, actions are named as gerunds. The name of this action is “examining (it)”, so that’s what you invoke.

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.