Going to a thing


I am currently debugging a short but very early piece of work, so a lot of questions arise…

Here’s one: I have established a studio space as one room, where the kitchen is in a corner, but in the same room:

The kitchen is scenery in the Studio. The description of the kitchen is "The whole area of Colin's kitchen is as good as new. He has probably never even boiled an egg."

No problem so far. Nevertheless, if the player tries to go to the kitchen, not knowing of course that it is not a separate room…

… which is a bit weird. I mean, I understand that “going to” applies to directions, but perhaps somebody tries GO TO SOMETHING. Why would the reply be


How can someone write an Instead rule that polishes the answer a little?


“Go to” is not in the grammar at all, so the parser is trying (and failing) to find an object called “to kitchen”.

You probably want to define it as a synonym for the entering action:

Understand “go to [something]” as entering.

Oh, that makes sense! I’ll try that.


Alternately, make the kitchen a transparent enterable open unopenable container.

Still, in order to enter the kitchen with “go to,” won’t I be needing to add the understand rule suggested by zarf?

Understand "go to [something]" as entering.


Well, after all, I decided to go with defining “go to” as a new action that actually does nothing other than saying that you don’t need to go any closer to an object (as a tip to a novice IF player, perhaps):

[code]Going to is an action applying to one touchable thing. Understand “go to [something]” or “walk to [something]” or “approach [something]” or “get close to [something]” as going to.

Check going to something:
if the noun is the player, say “Thinking that you have multiple personalities is one thing; thinking that they can walk away or towards each other is taking it too far.” instead;
else say “You don’t need to explicitly walk to or approach something that is in the same room with you, in order to interact with it[one of].[or]. Simply examine it or do something with it.[stopping]” instead.[/code]
I still get a funny answer when the player writes “GO TO SOUTH”:

In this case, ideally, I would like to give another tip to the novice player, by adding to the Check rule:

… but it doesn’t work (without giving any warning message).

Directions aren’t things (they’re a kind of object, technically), so “GO TO SOUTH” doesn’t match the “go to [something]” grammar line. That’s why you get that error, which is a special error that happens when the command contains a direction where the Understand line expects a thing. You get the same thing if you try “get north.”

You ought to be able to solve this by writing a new Understand line that deals with directions (haven’t tested this, though):

Understand "go to [direction]" as going.

Yep, it works! Thank you!