Examining all objects in a location before an event

Hey all-
I’d like a scenario where the player has to examine everything in a room before an event happens to change things.
Here’s my code:

The Doghouse is a room. "A comfortable doghouse."

The dog is here. The description is "A dog."

The flea is here. The description is "A flea."

The bone is here. The description is "A bone."

A thing can be examined or unexamined. A thing is usually unexamined. 

Carry out examining something for the first time: now the noun is examined.

After examining something:	
	if each object in the Doghouse is examined:
		say "Boom!".

It doesn’t throw an error, but it doesn’t work. No boom. I tried it with “each object”, “everything”, “every object”, etc. Same result: no boom. I made sure to examine myself, checked scope… but no boom.
What am I missing here?

Two things:

  1. The phrase “for the first time” doesn’t mean the first time that a particular thing (the current noun) has been examined, it means the first time that the rest of the condition (i.e. the current action is examining something) is true. If you try, for example, >SHOWME BONE (a built-in debugging verb), you can see that only the first item gets marked as examined.

  2. The player object counts as something in the Doghouse, too! [EDIT: Oh, forget this part. My apologies for not reading as closely as I should have.]

1 Like

Yep- removing “for the first time” works. That was there for another reason, so removing it makes things complicated for another part of what I want to do, but I can work around that, I think.
I think I finally understand how “for the first time” works, thanks to your comment.
Many thanks!

If the other thing that you want to do relies on some code that was previously part of the same rule, don’t forget that it’s entirely possible to have more than one rule apply in the same round of action processing. So it’s fine to have:

Carry out examining something:


Carry out examining something the first time:

The latter will apply only once.

1 Like