This should be simple, but it is frustrating the heck out of me.
All I want is for the character to get a specific message when they try to go west from a specific location. But all I ever get is, “You can’t go that way”. I don’t want a generalized message for going nowhere, because that particular direction needs its own message.
Aurum Fields is a region.
West Gate is a room. "Before you stands the great gate of Aurum.
Guards warrily eye people going in and out of the city. Behind you lies the Western Road."
West Gate is outside. West Gate is in Aurum Fields.
[* This doesn't work. Why? *]
Instead of going west from West Gate:
say "You just came from that direction. There is nothing for you that way.".
I also tried using “before”…
Before going west from West Gate:
say "You just came from that direction. There is nothing for you that way." instead.
MTW got to the solution before I posted, but here’s why it works that way:
From §7.13 of Writing with Inform:
Diving a little deeper into this, the going action has a variable called the “room gone from.” (This is an action variable as described in §12.10.) Any “from” you see in a going rule is referring to the room gone from–so “going west from West Gate” is basically “going west when the room gone from is the West Gate.” But the room gone from (and room gone to) don’t get set unless there’s a map connection, so when you’re going nowhere, you’re not actually going west from West Gate.
So “Instead of going west in West Gate” should do what you want.