Jiminy Muskrat!

I have an NPC that wanders.

Here’s some of the relevant code:

Instead of jumping: say "You jump as hard as you can and grab the inner rim of the tire. You kick your heels in the air and gain enough momentum to swing yourself over solid ground."; now player is in Cemetery; now monster is in Bottom of the Grave.

[code]The monster is a person. The monster is in the Attic.

The monster counter is initially zero.
Every turn when Attic is visited:
if the monster counter is two:
end the story saying “The monster caught up with you and ripped you to shreds. You have died.”;
otherwise if the monster is in the location:
increment the monster counter;
now the monster counter is zero.

Every turn: [if ghost is off-stage]now monster is in location.[/code]

The monster should stay in the bottom of the grave, until a certain condition is met:

[code]Every turn: [if ghost is off-stage]now monster is in location.

Instead of doing anything with the mouldy book: say “You sit and read how Dr. Frankenstein created his famous and feared monster. One passage especially disturbs you, the one that tells you that opening the book allows the ghost which has been pursuing you to gain physical form. You toss the book to the floor and prepare to leave, but as you do the monster appears and roars in your face.”

After taking mouldy book: now ghost is off-stage; now monster is in Attic.[/code]

But the monster tends to show up – even in the presence of the ghost – when he’s not supposed to. Specifically, he shows up unexpectedly in the Hallawy.

I’m at a loss to explain this.

Remember, anything in brackets (outside of quoted text) is a comment, and thus will be ignored entirely by the compiler. Your [if ghost is off-stage] does nothing.

OK, I’ll trying unbracketing that. Thanks.