Permission to Visit by Ron Newcomb

(Ron Newcomb) #1

This topic is for discussions related to Permission to Visit by Ron Newcomb

#2

Is there a way to use this extension to go to “location name” ONLY if location is an exit of the room player is in?

I would like people to be able to say “Go to River” instead of “south” or “s” if the location they are in has the river listed as an exit to the south.

As it works for me now, it will jump to any location on the map even if it is not visible from where the player is now. If the river is not directly accessible from the current location (even if visited), I would prefer it fail instead of just going through other locations to get to the river. I have read through the docs and have found ways to modify behavior of the extension, but not this function.

As always… Thanks!

(Hanon Ondricek) #3

There’s an example in the doc about:

Check travelling to (this is the Don’t Jump To Unvisited Places rule): if the destination is unvisited, say “You don’t know where [the noun] is.” instead.

It seems you could modify that to something like if the destination is not adjacent to the location:

Inform 6:14 Adjacent rooms and the map

1 Like
#4

I tried using that rule “as is” to test it with the intent to modify it. Even in the extension example scene “Testing Area” it gives an error on compile:.

Problem. In the sentence ‘if the destination is unvisited’ , I was expecting to read a condition, but instead found some text that I couldn’t understand - ‘destination is unvisited’.

I was trying to match this phrase:

if (destination is unvisited - a condition):

But I didn’t recognise ‘destination is unvisited’.

So I kept looking for another way.

(Ron Newcomb) #5

Short answer is no, it’s designed for when travel is gated by social relationships rather than physical world transportation issues.

I think what you’re going for can be achieved without an extension at all. In the Understand chapter of Inform’s manual is an example of Understand “go to [an adjacent room]”… which I think serves your purpose, though my memory is a bit hazy.

1 Like
#6

Not hazy at all! This works:

Going by name is an action applying to one thing.

Carry out going by name: say “You walk to [the noun].”; move the player to the noun.

Understand “go to [any adjacent room]” as going by name.

Thanks Ron and Hanon!