I have an action room_navigating, as in *go to grassy clearing." To do this I need to allow the player to go to any room:
Room_navigating is an action applying to one thing.
Understand
"go back/- to/around/near/by/-- [any room]",
"return to [any room]",
"walk to/-- [any room]",
"run to/-- [any room]",
"follow [any room]"
as room_navigating.
Check room_navigating:
if the noun is the location, say "Well, happily you're already here." instead;
Carry out room_navigating:
let initial location be the location;
let the destination be the noun;
if the initial location is the destination,
say "." instead;
let heading be the best route from the initial location to the destination;
[ say "(DEBUG: heading toward [noun] is [heading])[line break]"; ]
if heading is nothing:
say cant_find_that instead;
else:
now player is not discouraged_from_compass_navigating;
try going heading.
Thereās also a fail-room-navigating action to catch those rooms that are unreachable and render a sensical message.
This form of navigating is used during the majority of the game as a response to the unnatural IF convention of using compass directions. (I also have compass directions disabled during most of the game.)
All that is fine and works pretty well.
In one section of the game (Scene_Lost), we have elusive landmarks that are selected at random for the player to head for.
The_distance is a container.
The_distance is in Limbo.
Definition: an elusive_landmark is distant if it is in the_distance.
landmark_navigating is an action applying to one thing.
Understand
"go to/near/by/-- [any distant elusive_landmark]",
"walk to/near/by/-- [any distant elusive_landmark]",
"run to/near/by/-- [any distant elusive_landmark]",
"landmark_navigate [any distant elusive_landmark]"
as landmark_navigating.
Check landmark_navigating:
if the noun is visible:
say "Well, that's right here." instead;
if the noun is not in the_distance:
say cant_find_that instead;
To say cant_find_that:
say "You're no longer sure how to get there. [looking_for_available_exits]";
Carry out landmark_navigating:
say "You head toward the [noun].[run paragraph on] ";
move_within_dark_woods.
The can't reach inside rooms rule does nothing if landmark_navigating.
move_within_dark_woods does the dirty work of moving the distant landmark to the current location, moving the old landmark to Limbo, and selecting a new distant landmark.
All that works pretty good as well. Howeverā¦
In the scene where the player should be landmark_navigating (Scene_Lost), I want a command such as go to tree
to privilege landmark_navigating rather than room_navigating.
>l
[looking]
Dark Woods
You are not completely certain which way to go. The woods look familiar and altogether strange. Itās difficult to get your bearings. The forest slopes down into a shallow draw. Here there is a broad trail.Wait, in the distance, you can just make out a white tree. This may be the way back to Honey and Grandpa. You long to give him a hug and never let go.
[looking - succeeded]>go to tree
[room_navigating Top of the Sentinel Tree]
Youāre no longer sure how to get there. You take a quick look around you: Whew, in the distance you can just make out a white tree.
[room_navigating Top of the Sentinel Tree - failed]>go to white tree
[landmark_navigating the white tree]
You head toward the white tree. You bushwhack your way through the underbrush.[(1) looking]
Dark Woods
You are confused. The woods look familiar and altogether strange. Itās difficult to get your bearings. The trail tops a small rise. Here there is a white tree.Finally, a ways off, there is a burned out tree.
[(1) looking - succeeded]
[landmark_navigating the white tree - succeeded]
Iāve tried:
Does the player mean landmark_navigating during Scene_Lost:
It is very likely.
Does the player mean room_navigating during Scene_Lost:
It is very unlikely.
to no avail. rules
doesnāt seem to show these āDoes the player meanā rules.
I donāt want to disable the room_navigating but to have landmark_navigating prioritized during this scene and have ātreeā match the object that landmark_navigating applies to.
Thoughts?