The move action

I have a lid covering my well, and obviously would like the player to be able to open the well by typing “move lid”. This was not as simple as I had thought, and would appreciate some help.

This is, as I’ve understood it, how it should work:

Moving is an action applying to one thing. Understand "move [something]" as moving.

Instead of moving the metal lid:
	say "You move the metal lid aside.";
	now the well is open.

However, the player only get the standard answer (Nothing obvious happens.) when trying to move the lid, and not the instead rule.

I found this post where it’s pointed out that “move” is part of inform language. My guess is that, if I haven’t made a mistake in the above code, this can be a reason why it doesn’t work. If so, is there a way around it?

Looks like “move” is considered the same as “push” in the standard inform environment. To override that, you just have to put this in:

Understand the command "move" as something new.

Now the “move” command will be in your control.

Alternatively, if you don’t mind people using push to handle the lid, you can just do “Instead of pushing the metal lid”. That will make “move” work too without having to define it as something new.

No that’s not the problem. You can use “move” in Inform code (source text) to make the game move objects automatically in response to some rule of yours, but the player can still use the command MOVE quite independently of this

As abjectadjective said the Standard Rules of Inform already defines the command MOVE as a synonym to the command PUSH – both triggers the pushing action. So the easiest way to make the command MOVE LID work is simply to write an ‘Instead of pushing the lid’ rule – again just as abjectadjective suggested.

(And don’t forget to make your rule for pushing the lid behave differently depending on whether at the moment it covers the well or not.)

Thank you very much!