Tightly Timed Action

Never mind. I was trying to move a room to nowhere. And a room is already nowhere! I’m going to blur the code below, because it’s totally spoilery. In general terms, the problem I’m having is that the player has to perform a certain action and then leave the location immediately. The location that has to be exited is an interior, and immediately after the exit I need the interior location to be trundled offstage so that it can’t be entered again.

First the bad thing that happens:

>out
The Lamborghini trundles down the slope and takes a nosedive into the creek!

[** Programming error:  (object number 931898)  has no property component_parent to write **]

[** Programming error:  (object number 931898)  has no property component_sibling to write **]

Here’s my code (with the ‘say’ text scooped out to make it easier to read):

Instead of releasing the brake lever:
	say "The Lamborghini starts rolling. If you don't get out quickly, you'll be in serious danger!";
	now the brake lever is released;
	the car disaster happens in one turn from now.
	
After going from the Interior of the Lamborghini to the Employee Parking Lot:
	if the brake lever is released:
		say "The Lamborghini trundles down the slope and takes a nosedive into the creek!"

At the time when the car disaster happens:
	if the player is in the Interior of the Lamborghini:
		say "Oh, no! As you stare out the windshield in mounting horror...";
		end the story saying "blah blah blah";
	else:
		now the wrecked-Lamborghini is in the Employee Parking Lot;
		now the Lamborghini is in Limbo;
		now the Interior of the Lamborghini is nowhere.

No matter where I try to get rid of the interior location, I get pretty much the same result. And I need the timing of the next event to be immediate; if there’s a delay, the player can re-enter the interior location.

How can I manage this dramatic event?

Can you tag the interior room as whole or destroyed, and on exiting:

now the Interior is destroyed.

Instead of entering the Interior when the Interior is destroyed:
say “The car is wrecked in the creek.”

Or something like that? The Interior is still there, but it isn’t enterable now.

2 Likes

AmandaB has the correct approach- block movement to the room ‘Interior of the Lamborghini’ rather than trying to remove it.

You don’t actually need to create a new property (whole/destroyed) in order to do this, although that would work. You can simply say:

Instead of going to the Interior of the Lamborghini when the Lamborghini is in Limbo:

Note that if the ‘Interior of the Lamborghini’ is a room you wouldn’t enter it, you’d go to it by typing ‘go in’ or ‘go inside’ or just ‘in’ or ‘inside’. You’d need code to divert typed commands includiing ‘enter’ to the going action for them to work.

Alternatively, if you want to achieve this effect by removing the interior of the Lamborghini, you can perhaps make the Lamborghini an enterable container rather than having the Interior as a separate room…

1 Like

A further alternative would be the mildy-deprecated

Change the inside exit of the Employee Parking Lot to nowhere.

which destroys the map connection to the Interior of the Lamborghini.