Use inside and outside in both earthbound and nautical locations?

I have a boat in my game, I have set up the nautical directions, but I want to be able to use inside and outside as valid directions both on and off the boat, at the moment it retuns error when trying to use inside and outside when off the boat - although it still moves the player.

My code:

A room can be nautical or earthbound. A room is usually not nautical. A direction can be nautical or earthbound. A direction is usually not nautical. Starboard, port, fore, aft, up, down, the inside and the outside are nautical.
Before going a nautical direction when the location is not nautical, say “Nautical directions can only be used on board ship.”
Before going an earthbound direction when the location is nautical, say “Compass directions make no sense on board ship, but you can use [list of nautical directions] instead.” instead.

Looks like you’re using the “Fore” example from the recipe book? http://inform7.com/book/RB_8_2.html

Not tested, but I think you could not define inside and outside as either nautical or earthbound and say:

Before going outside when the location is nautical:
     say "You disembark from the ship.";
     move the player to The Dock instead.

Before going inside when the location is not nautical:
     say "You board the ship.";
     move the player to The Foredeck instead.

Is “move the player” depricated? I don’t remember. You could also say “Now the location is…”

1 Like

What Hanon said – also, I think the reason you’re getting an error but then the player still moves is the inconsistency in these lines:

Before going a nautical direction when the location is not nautical, say “Nautical directions can only be used on board ship.”
Before going an earthbound direction when the location is nautical, say “Compass directions make no sense on board ship, but you can use [list of nautical directions] instead.” instead.

That is, in the second line there’s an “instead” that cuts off the action, but there isn’t in the first Before rule which means the action continues. I think you probably want an “instead” in both for consistency’s sake (though honestly as a player I’d probably prefer to be able to use both sets of directions in both regions…)

1 Like

Thanks both!