I’m having trouble closing a door in my game – I keep being told the action ended without result. Do I have to specify to I7 whether a door is open before I can tell it to close the door?

What exactly is the problem? Does the door not close? How are you trying to close it?

Instead of doing anything while player is in Lavatory: if multi-colored door is closed: continue the action; otherwise: say "Mom will punish you if you don't close that door first."

What happens if I close the door is that the “if” is ignored and the “otherwise” carried out – i.e., the message about Mom gets printed every time, and the closing the door action is reported as ending without result.

I’m pretty sure that instead statements always end without result because they interrupt the normal Check/Carry Out/Result rules (or whatever they’re called.) So that’s not the problem. I believe that the instead rulebook runs before any action is carried out, so if you say “close the door”, instead will occur before the door is closed, so you’ll get the otherwise action.

How do I keep the otherwise statement from running then? I just want to close the door without that running.

Basically, you either have to (1) make it so the rule doesn’t apply if the player is trying to close the door, or (2) put some lines in the rule telling Inform what to do if the player is trying to close the door.

Any suggestions as to the proper code for that?

Try a BEFORE rule. Sorry for the brevity, but i’m in the phone and typing is hard. :slight_smile:

I suggest checking out §7.9 in the Writing with Inform documentation: All actions and exceptional actions.

Thanks to both.