Easiest way to give specific movement blocking message(s)

Hey guys,

What is the easiest way to set up specific messages preventing movement in certain directions in certain locations?

EG - In a particular room, you might want west to give, ‘The forest is too thick that way.’

I couldn’t work this out, since the ‘You can’t go that way’ message kicks in before ‘Instead of…’ and other similar rules, if there’s no room connection in the direction the player tried.

No, an instead rule works just fine. I tried it.

Instead of going west when the player is in The Garden, say "The forest is too thick that way."

Hm, you’re right. I must have used different phrasing than this or something. Thanks.

Edit: OK here’s what I had, which doesn’t work:

Instead of going east from Shade Mud: say "The forest's too thick."

Apparently, there is a sense in which you don’t go east from Shade Mud unless there is a room east from Shade Mud (if there were a room east of Shade Mud, your original instead rule would work). Rather, Inform takes it that you go nowhere from a room if there isn’t a room to go to in the direction you’re trying to go (so “Instead of going nowhere from Shade Mud, say …” will work for all directions in which you can exit Shade Mud).

So, I guess it makes sense; but it still doesn’t really explain WHY the instead rule doesn’t apply. (I wasn’t really helped by the explanation of these issues in the built-in WI 7.13.)

Is it a general feature that before, instead and after rules will not apply, if you try to put restrictions on an action’s action variables inside them, or what?

Well, is that any different from the fact that “Instead of taking the lamp” won’t work when the object you’re taking isn’t the lamp? It’s just that, because of the oddities of the going action, you’re considered to be going east in Shade Mud but going nowhere from Shade Mud. Or I may have misunderstood your question.

No. Yes. You’re quite right; I was confused.

Just as you can’t take the lamp where there is no lamp to be taken, you can’t go east where there is no direction east to go.
The odd thing was rather why the instead rule fired when you tried going east IN Shade Mud, even though there was no direction east to go.

But the answer to that question, I suppose, is that the going action applies to one visible thing: i.e. all directions are in scope for the going action regardless of whether there is such direction from the current location (whereas taking applies only to things in the current location; so, if there is no lamp in the room, an instead rule specifying a lamp as the noun won’t apply).

OK. I get it.