l7: Super Newbie Question 1

sigh

Really tried to get this to work, but I’m doing something wrong. I want some objects to be examinable only after examining another object. I set up a new property, noticed/unnoticed, for objects, but the command to change an object’s property to noticed doesn’t seem to work.

Apologies for the silly question, but a quick example of the right way to do such a thing would be much appreciated.

This should get you started.

A thing can be noticed or unnoticed. A thing is usually unnoticed. After examining something: now the noun is noticed.

Test is a room. The shadow and the light bulb are in Test.

Before examining the shadow: If the light bulb is unnoticed, say "It's too indistinct to make out. Maybe you could try looking at something else." instead.

However, if you already have something morally equivalent to this, perhaps your special case examining code isn’t working. You can check this out with the testing command RULES ALL, which will tell you about the interpreter considering each rule in turn (although this produces a LOT of spam so use it sparingly).

Short of that, feel free to post a testing game that doesn’t work, but that you feel should, and there are lots of smart people here that might be able to teach you where you are going astray.

I would tend to do it a little differently:

The description of the shadow is "[if the lightbulb is unnoticed]Inky and formless[else]The silhouette of a moose -- possibly Bullwinkle[end if]."

This avoids the use of a before rule. Before rules bypass some of the normal procedures that the parser uses. (You could use an instead rule rather than a before rule, but putting the if-test inside the description is tidier.)

Or just simply:

The description of the secret message is "[if we have examined the encryption key]Decoding the message reveals that it's a local restaurant's takeout menu.[otherwise]The message makes no sense to you.[end if]"

Although in many similar cases it’s easier and more robust to just leave the other object out and move it in place after examining the first object.

After examining the mirror for the first time: say "You didn't notice it before, but through the mirror you see that a book has fallen behind the nightstand."; now the diary is in the bedroom.

You need a “continue the action” in your After rule, or it won’t print anything.

EDIT: Scratch that, I think examine prints a description during the carry out phase. But that’s not true for most actions.

Better yet, use a carry out rule, which continues the action by default:

Carry out examining something: now the noun is noticed.

Thanks for the tips :slight_smile: Helped a bunch.