Moving player in a direction


I’m attempting to have a particular state in which any command the player enters is ignored and instead they are moved in a direction (north, in my case).

Here’s what I’ve been able to come up with:

After reading a command when autopiloting-story is true:
	move the player to the north;
	reject the player's command;

But when it runs “move the player to the north” it gives me this error:

*** Run-time problem P61: Attempt to move the player off-stage.

Though I know for certain there are rooms to the north. It doesn’t seem to understand that I want the player to be moved to the room relative to the one they are standing in.

Thanks in advance for any direction!


Welcome to the forum!

What’s happened here is that that phrase, ‘move the player to (X)’ is always interpreted by Inform as meaning, effectively, ‘teleport the player to (location X)’.

So Inform’s trying to teleport the player to the actual direction North, which is defined in Inform as an object, but sort of an abstract one with a lot of special conditions attached to it. And that North object is not in the game world, but outside it, an area which is referred to as ‘off-stage’. This explains the error message you’re getting.

The phrase you’re after when you want the game to try making the player do something is ‘try (action)’. In your case, ‘try the player going north’. I think if you leave out ‘the player’, that’s assumed (for instance you could put the name of another character there), so just ‘try going north’ should work as well. Swap one of these phrases in for ‘move the player to the north’ and I hope that will do the trick.



Thanks a lot and sorry for the beginner question!