Section - Following
[Stole most of this code from the Inform 7 Recipe Book because I'm too lazy to figure it out myself.]
A person has an object called last location.
Understand "follow [any person]" as following.
Understand "follow [something]" as following.
Understand the commands "chase" and "pursue" as "follow".
Following is an action applying to one visible thing.
Check following:
if the noun is not a person, say "[The noun] [is-are]n't going anywhere." instead;
if the noun is the player, say "You can't seem to escape yourself." instead;
if the location of the noun is the location, say "[The noun] is right here." instead;
if the last location of the noun is nothing or the noun is off-stage, say "It's not clear where [the noun] has gone." instead.
Carry out following:
let the destination be the location of the noun;
if the destination is not a room, say "[The noun] isn't anywhere you can follow." instead;
let aim be the best route from the location to the destination through obvious rooms;
say "(heading [aim])[line break]";
try going aim.
To move (pawn - a person) tidily to (target - a room):
now the last location of the pawn is the holder of the pawn;
move the pawn to the target.
First carry out an actor going:
now the last location of the actor is the location of the actor.