-ing verses -ed rules

I’m not sure how I should word this rule making action correctly. Does Inform automatically understand a created rule with -ed tagged on the end?

Clanking the chains is an action applying to one thing.
Understand "clank the chains" as clanking the chains.

Instead of going north before player has clanked the chains:
	say "There are some metal statues here blocking the way." 

Yes, but only in the specific form “we have clanked the chains” and “we have not clanked the chains”.

There are a couple of other problems with your code:

You can’t write “instead of going north before…” This will work:

Instead of going north when we have not clanked the chains:
    say "There are some metal statues here blocking the way." 

Second, you should write this action as applying to any object:

Clanking is an action applying to one thing.
Understand "clank [something]" as clanking.

Report clanking:
	say "That doesn't clank."

Report clanking the chains:
	instead say "Clank!"

The iron chains are scenery.

Instead of going north when we have not clanked the chains:
	say "There are some metal statues here blocking the way." 

This way, “clank” is a verb in full standing and the player can try clanking anything. Also, the parser will recognize synonyms like (in this example) CLANK IRON CHAINS. This is much better than requiring an exact phrase, which is what you are doing up there.

2 Likes

You will also want to make your “instead” rule a bit more specific about what “going north” means. At the moment, this code will fire whenever the player tries to go north anywhere in the game, which might be all right if this is the first room, but otherwise a pain, because it will block the going action and print the message about the statues no matter where you are.

If your room is called Statue Room, you might write:


Instead of going north from Statue Room when we have not clanked the chains:
	say "Some metal statues are in the way."
1 Like

Wonderful, to both @zarf and @rainmaze!