Why doesn't this work? (Action Redirection)

[code]instead of looking under the white door, try looking at the doorspace instead.

[/code]

the white door is a door, the doorspace is just an object.

[code]In the sentence ‘try looking at the doorspace’ , I was expecting to read a rule, but instead found some text that I couldn’t understand - ‘try looking’.

I was trying to match one of these phrases:

  1. (try looking - rule) at (doorspace - time)

  2. try (looking at the doorspace - an action)

  3. try (looking at the doorspace - stored action)

This was what I found out:

try looking = something unrecognised

doorspace = a thing

looking at the doorspace = something unrecognised[/code]

Any ideas?

‘Looking at’ is not a standard action. It’s called ‘examining’.

I’m an idiot. Thanks.

Can you list the “standard actions” (or the place in the documentation that lists them?)

Look in the Index tab of the IDE.

Awesome! Thank you!

Ok, now I am confused. Looking IS a standard action, according to the index?

The standard action is just “looking” – no prepositions, no further objects. Looking at something isn’t a standard action.

You code should look something like this.

Check looking under the white door: try examining the doorspace instead.

Also, while having the “instead” phrase in an instead rule works, it’s a tad overkill.

Hope this helps.

You need to keep in mind the distinction between an action and the player commands (of which there may be more than one) which invoke that action. In this case, the action is examining; The command “look at [something]” invokes it. In the case of standard actions, the list in the index indicates which commands invoke which actions. In the case of custom actions, the phrase “Gobbledygooking is an action applying to one thing.” creates the action; "Understand “gobbledygook [something] as gobbledygooking.” defines the command.

Robert Rothman

That is confusing. Especially since the command LOOK AT triggers the examining action (when typed by the player).

Another similar and very common source of confusion is to write source code like “try putting the gremlin into the microwave”, which won’t work. As player you can PUT GREMLIN IN MICROWAVE, but as author you need to “try inserting the gremlin into the microwave”.

(“Try putting the cash on the desk”, on the other hand, works fine.)

Theoretically, you could allow them to work by adding these.

[code]Looking at is an action applying to one thing. Instead of looking at something, try examining the noun.

Putting it in is an action applying to two things. Instead of putting something in something, try inserting the noun into the second noun.[/code]

However, it would be better if Inform allowed defining actions in a similar way to this for commands.

Understand the command "snap" as "attack".

So, something like this.

[code]Understand the action looking at as examining.

Understand the action putting it in as inserting it into.[/code]

I’m sure somebody with greater knowledge will explain why this is totally wrong, but the way I think of it is that the “understand” stanement which defines a command is basically an instruction to the parser as to how to interpret the player’s input. When the author uses a “try” statement, it bypasses the parser entirely and goes right to the action that is being called for – so you need to use the action’s “official” name and cannot rely on a parser command to interpret it.

Robert Rothman

The way I see it, “try” statements are (in a way) equivalent to abiding by or considering various rules or rulebooks. So you do need to use the actual name of the action in the same way you use the actual name of a rule or rulebook.

Your explanation is totally right.

I think this is a variant on the liar’s paradox.

Robert Rothman