Persisting dual descriptions

For some reason I end up having both descriptions displaying.
Any ideas?

After examining the Tiny Dresser:
	say "You pull open the one drawer but find it to be empty. Yet as soon as you push the drawer back in, you hear a thudding noise.";
		Now the Digital Recording Device is inside the Tiny Dresser;	
		now the description of the Tiny Dresser is "You now find a Digital Recording Device is in the drawer!"

I’m not on the computer but maybe you could add for the first time to the after line. You’d still have problems though, as the new description won’t make sense after another examine.

2 Likes

Yeah, I think there are a few things going on: 1) the After rule is currently set to fire each time you examine the dresser; 2) After rules come after Carry Out rules, so the default carry out examining rule is printing the description in a way that doesn’t necessarily make sense; 3) the description doesn’t change in the likely circumstance that the player takes the recording device; and 4) the dresser isn’t implemented as a container (maybe you’ve got a separate drawer implemented?)

Anyway here’s a version that cleans some of this up – I suppressed the listing of the dresser’s contents in the room description since I assume you want to keep the surprise.

The bedroom is a room.

The tiny dresser is a container in the bedroom.  The description is "You pull open the one drawer but find it to be empty. Yet as soon as you push the drawer back in, you hear a thudding noise."

The digital recording device is nowhere.

After examining the Tiny Dresser for the first time:
	Now the Digital Recording Device is inside the Tiny Dresser;	
	now the description of the Tiny Dresser is "[if the digital recording device is inside the tiny dresser]You now find a Digital Recording Device is in the drawer![otherwise]The dresser's single drawer is empty.";
	
Rule for printing the name of the tiny dresser: 
	Say "[printed name of the tiny dresser]";
	omit contents in listing.
1 Like

Thank you. I don’t know why my head has such a hard time getting around the language of afters and rules. Reminds me of physics folks who say stuff like, ‘We don’t know why it works but it works’.

I wondered whether you wanted to find the device in the same way when opening the dresser (as well as when examining it). This seems to work, but no doubt there are things I’ve not considered…

The Bedroom is a room.

The tiny dresser is a closed, openable container in the Bedroom. Understand "drawer" as the tiny dresser. The description is "The dresser is very small, with only one drawer."

The digital recording device is nowhere.

To find the device:
	say "You pull open the one drawer but find it to be empty. Yet as soon as you push the drawer back in, you hear a thudding noise.";
	now the digital recording device is inside the tiny dresser;

After examining the tiny dresser when the digital recording device is nowhere:
	find the device;

Check opening the tiny dresser when the digital recording device is nowhere:
	find the device instead;

[Avoid saying "(closed)" etc]	
Rule for printing the name of the tiny dresser: 
	say the printed name of the tiny dresser;
	omit contents in listing;
2 Likes