adv3Lite: Sensing in a Container

I have a transparent container, which is closed and can’t be opened, except by, you know, a special tool that’s not a key. In the container is something that has a smell. In adv3 I could give the container the fine mesh material, and the material would transmit the odor. But looking in Chapter 16 of Learning T3Lite, I don’t see any reference to smelling inside of containers. That chapter seems to be strictly about smelling across regions. Unless I missed something by reading too quickly, of course.

How can I make the substance inside of the transparent but closed container smellable?

I tried adding this code to the room, but it didn’t help. Seems to me it should have, but apparently there’s a glitch in it somewhere.

addExtraScopeItems(action) { if ((action == SmellSomething) && (greenOoze.location == grate)) { action.scopeList = action.scopeList.appendUnique(greenOoze); } inherited(action); }

It should work if you set canSmellIn on the container object to true. You shouldn’t need to mess with the scope list since sense passing in and out of closed containers is controlled by the canXXXIn and canXXXout properties on the containers, where XXX is the sense in question. By default these all return nil when the container is closed (except for canSeeIn/Out if the container is transparent), but can be overridden to allow sound or smell to pass through.

That works – thanks, Eric. I had to do a little finagling to handle both the ambient odor and the odor of the specific object, but I think I’ve got it now.