Simple location dependent object description state question

HI again. I’m having an issue with something so simple I must be forgetting a crucial detail.

I’m just trying to get a location to not describe a door but only when the player is in a specific location and I’m getting the granddaddy Translating the Source - Failed. Maybe I have something interacting with it elsewhere.

I’d appreciate someone knocking some sense into me. Thanks in advance.

every turn:
	if the location of the player is the Cleaning Closet;
	the closet door is undescribed.

Since you’ve got the statement in a rule, you can’t use the declarative syntax – you need to say “now the closet door is undescribed,” which should get you past the compiler error.

You’ll run into an issue with this approach, though, which is that every turn rules fire at the end of the turn, after a go/enter command and its resulting room-description concludes – so the closet door will still be described when the player first sees the description of the cleaning closet (but it will be undescribed if they look later on). Similarly, you’ll presumably want it described again once the player exits the closet, but you’ll hit the same problem there too.

An easier approach might be to just make the closet undescribed, and then mention it in the description of the location that’s outside the closet so the player knows it’s there.

I’m okay with the door being described in other locations. It’s just when the player is in the closet that I want it to be undescribed.

The code I pasted was only the most recent attempt. I thought the following would work and was surprised when it didn’t. It felt like you do when you can’t remember how to spell a simple word.

when the location of the player is the closet the closet door is undescribed.

WWI 3.24 Concealment discusses the use of the undescribed property and calls it a “last resort,” offering the scenery property as a better choice.

That may be the easiest solution if you are OK with handling the description of the door only in room descriptions. If you want the door to be mentioned in the normal “locale description” process on one side but not the other, the simplest choice may be to make use of the mentioned property in a for writing a paragraph about rule, as described in WWI 18.24 Writing a paragraph about.

Rule for writing a paragraph about the closet door when the location is Closet:
    now the closet door is mentioned.
1 Like

WI §18.28. Printing a locale paragraph about offers

For printing a locale paragraph about a door (called the item)
    (this is the don't mention doors in room descriptions rule):
    set the locale priority of the item to 0;
    continue the activity. 

for suppressing door description in general. Following that approach, I had come up with:

After choosing notable locale objects when the location is the cleaning closet:
set the locale priority of the closet door to 0.

…but I like Otis’ solution better.

For a longer explanation of the point Mike makes, I’ll refer to a previous comment of mine on the three kinds of sentences: assertions, imperatives, and conditionals.

Now there are worms everywhere!

I appreciate you all taking the time to reply.