Conjuring and destroying items

So I want to spawn something in the room once puzzle is complete and delete other thing when something else happens. How do I do that?

You can always have something like this:

Lab is a room.

The vase is here.

There is a scorpion.

Instead of attacking the vase:
	say "You smash the vase with your magical powers and the pieces just vanish! The spirit that lived in the vase materializes in its place: a one-ton, angry scorpion.";
	now the vase is nowhere;
	now the scorpion is in the location.

Is this what you’re looking for?

6 Likes

Amanda’s option is the best - if you need create/destroy things you swap them for an object that is already created off-stage.

“There is a scorpion.” is equivalent to A scorpion is an animal. It is off-stage. “Nowhere” is a synonym for “off-stage” - the opposite being a specific room, container, supporter or “The location” meaning whatever room the player is currently in.

1 Like

So does here mean “the location most recently discussed in the code”?

1 Like

I believe it does under most circumstances, but I’ve had Inform fuss about it. Amanda’s code compiles and works as expected; and I added another room trying “here”:

Lab is a room.

The vase is here.

There is a scorpion.

Instead of attacking the vase:
	say "You smash the vase with your magical powers and the pieces just vanish! The spirit that lived in the vase materializes in its place: a one-ton, angry scorpion.";
	now the vase is nowhere;
	now the scorpion is in the location.

Second room is south of lab.

There is a box. It is a container. It is here.

1 Like