if and otherwise...

Why won’t this work as intended…(just an example)

Instead of opening the boss's door when the player is in Boss Office: if the boss is in the location: say "As you turn to the door, the boss shouts, 'Hey, you, I'm still talking! And I didn't say you could go for refreshments!' Intimidated, you sheepishly step back to the desk."; otherwise: say "As you slowly open the door and take a peek, the secretary outside gives you a hard stare through her spectacles. 'He'll be back soon for your grilling, he's just gone for refreshments!' The implication is that you stay. You are sufficiently intimidated, and close the door."; now the player is intimidated.

I notice that if I put an instruction after an ‘otherwise:’, and lined up with it(assuming it will be followed under either condition), it seems to be ignored…?? Is there a reason for this? I notice that I can simply move the ‘now’ up to before the ‘if…:’, and it will work, or I can type it after, and lined up with, each ‘say’. I just don’t know why I can’t just have it at the bottom, after the conditions are addressed…??


It should work, and does for me.

Okay, maybe I made up a bad example…but under what conditions would an assertion be ignored if it were placed under an ‘otherwise:’ and lined up with it…??


The only one that comes to mind is if your “if” and “otherwise” include an “instead”, which is effectively a “return false”. It stops the rest of the rule from executing. (For instance if you had ‘say “The boss shouts at you!” instead’.)

Thanks Draconis, but I think I may have found the real problem. I think I was assuming that ‘now the boss’s door is locked’ would automatically close the door. The example above was something I made up on the spot. The problem rule that I had included a ‘now the boss’s door is locked;’ but not a matching ‘now the boss’s door is closed;’. In testing I was baffled that I was able to walk through a locked door, because I locked the door(with a keyless unlocking rule that did not include a ‘now the door is closed’), without it being closed. I thought it was because I had put that assertion at the end of the rule, lined up with an ‘otherwise:’ near the end.

Thanks, sorry I wasted your time…