Why would a person stop following the player?

Hi again.

I’m dangerously close to being finished my game, so thank you to everyone who’s read my posts and double thanks if you had the time for an answer.

I have a character who is following the player around and it seems to be working fine but in a certain room they won’t follow.

The only thing I can imagine is that a door (which is open) is somehow causing a problem but I don’t know.

Any help would be great. The finishline is in sight!

Anyway, here’s the code.

Every turn while mrswhip is free:
    let pth be the best route from the location of mrswhip to the location of the player;
    if pth is not nothing, try mrswhip going pth.

Yes, that’s probably the reason. It should work when you append “using doors” to the route calculation:

let pth be the best route from the location of mrswhip to the location of the player, using doors;

Quoting §6.14. Adjacent rooms and routes through the map:

Best routes are ordinarily forbidden to go through doors, but if the suffix “using doors” is added as an option then any open or openable and unlocked door may be used on the way; and if “using even locked doors” is given, then any door at all will do.

3 Likes