Hiding a person in room descriptions during a chase sequence?

There’s an NPC who is running from the player character. When the player character enters a room the NPC is in, the NPC immediately bolts to a nearby room and there’s text to explain this is happening. However, the player will see the NPC listed as being in the room (because they were when the player character entered the room, but aren’t any longer by the time the player has read the text).

Every turn while the mercenary is in the Flat Field:
	if the player is in the Flat Field:
		say "You catch a glimpse of a black-clad figure dashing down the dirt road to the east.";
		now the mercenary is in the Dirt Road.

yields:

Flat Field
You can see a ramp, a mercenary, a dead agent, and a craft here.

You catch a glimpse of a black-clad figure dashing down the dirt road to the east.

Is there a way to hide the NPC in the room descriptions during the chase? Do I need to find another way to implement the chase so that this isn’t an issue?

There are lots of ways and levels at which to meddle with this mechanism.

The first one I’d consider is not having the mercenary in the room at any point during the chase. It’s also one I’ve got time to describe during this lunch break of mine.

Is it a linear chase on a predefined path? i.e. I go in room A, guy runs to B. I go in room B, guy runs to C… until he’s in the last room or the chase is over.

If it’s linear, you can just print a message saying the guy runs to the next room the first time the player enters each room.

e.g.
Flat Field is a room. "It's very flat here[first time].[paragraph break]You catch a glimpse of a black-clad figure dashing down the dirt road to the east[only].".

and do this for each room in the chain.

In this scheme, the mercenary doesn’t even have to be in the game (on-stage) yet. Or they can just be in the final room, ready for when the player is able to interact with them for real.

One problem you may face is if the player types ‘follow merc’, because he’s not really there. But this is a problem however you handle the whole chase, because even if he’s in the next room, he’ll be out of scope at the time the player tries to follow. So then some more programming is needed to allow the player to specify him as the target of certain commands.

PS - Obviously, the overall method I described relies on the player only being able to visit all the locations involved in chase order. If they can get to room C before B for instance, the messages start to not make sense.

-Wade

2 Likes

Wade raises some of the important implementation details here, and I like his way of approaching things. If you are just looking for the rock-stupidest way to suppress the description of a person or object in the location description, though – which is a useful thing to be able to do – all you need to do is say “the mercenary is undescribed.” NB at some point you might want to reverse track so that he’s ordinarily visible, which you just do with “now the mercenary is described”.

4 Likes

Thanks, this may be what I was looking for. I’m going to try that.

“Rock-stupid” worked like a charm. Making the mercenary undescribed (and then later reversing it) did exactly what I wanted. Thanks!

2 Likes