Description of an object changing

There is a torch in North Hall. "A merrily blazing torch is in a rack on the wall".
After taking the torch and walking around with it it goes out, is thrown away as useless and ends up off-stage.

When coming back to North Hall the torch is reinstated:

Before going to North Hall when the torch is off-stage: now the torch is ablaze; now the torch is in North Hall.

But this time around the description given when entering is “You can see a torch here”

How can I make the first description “A merrily blazing torch is in a rack on the wall” appear every time?

There are two ways to do this.

The initial appearance (the “A merrily blazing torch is in a rack on the wall.” text) is shown if the item in question is not marked as “handled” (which happens when the player takes it for the first time). So you could add the line “now the torch is unhandled” to your resetting code.

You could also write a “Rule for writing a paragraph about the torch when the torch is in the North Hall: say [your text here].” to always print the text you want.

The difference between these only shows up when the player takes the torch, then drops it in the North Hall. The first one will say “You can see a torch here.” The second one will say “A merrily blazing…(etc)”.

You could make the torch scenery, and then hide it in the description.

Room description:

“This is my room. [if the torch scenery is in the location of my room]A merrily blazing torch is in a rack on the wall.[end if][if the torch scenery is not in the location of my room]The room is somewhat dark.[end if]”

Then, once you take it, throw the scenery object away and swap it with a torch thing that you can carry.

Instead of taking torch:
say “You grab the torch from the rack”;
Remove the torch scenery from play;
Now the player is carrying torch.

Thanks for the ideas. Seems there is more than one way to do it as usual.

Draconis’s first suggestion works best for me. If the torch is dropped in North Hall
it’s more natural for it to just be lying around there, rather than jump up to sit in the rack.

“unhandled” threw an error though, it needs to be “not handled”, but I found that
out quickly enough by experimenting.