best most simplest way to report NPC leaving room please...

can anyone help me, for I7, with a simple code that will report the NPC exiting the room and what direction (s)he went? for some reason, in the Patrollers extension, its not being reported. plz HALP!!!

k thnx

Check out the examples in Chapter 7: Other Characters - 7.13. Traveling Characters in the Inform Recipe Book.

Or, you can use something like I used in Hallow Eve:

At 6:46 PM: move Fred Murks to Rocky Trail; move Brenda Bender to Rocky Trail; If the player is in Rocky Trail, say "Fred and Brenda arrive from the west."; If the player is in WoodTrail2, say "Fred and Brenda walk to the east."; now FredBusy is true;

…though I’m certain I over-used it. I’ve got a few timing issues to work out before the final release.

thnx dr. jiz!!!

I don’t understand why you wouldn’t just have the NPC actually try going:

The bar is a room. The street is south of the bar. Fred is a man in the bar. Every turn: If Fred is in the bar, try Fred going south; [syntax is weird, basically Fred will try to go south when this command is executed] Otherwise try Fred going north.
This will report Fred arriving and leaving because the Standard Rules handle this automatically. If you must move Fred from one location to another instantly with Now…, then you should report it yourself:Teleport pad 1 is a room. Fred is a man in teleport pad 1. Teleport pad 2 is a room. Every turn: If Fred is in Teleport pad 1: If the player can see Fred, say "Fred disappears."; Now Fred is in Teleport pad 2; If the player can see Fred, say "Fred appears."; Otherwise: If the player can see Fred, say "Fred disappears."; Now Fred is in Teleport pad 1; If the player can see Fred, say "Fred appears." The street is south of Teleport pad 1 and north of Teleport pad 2.
I’ve tested both of these and they work fine.

The main problem with the first approach, however, is that the rule is only executed once per turn, which could be annoying if you want an NPC to travel a long distance. I’d do something like this:

Point A is a room. The street is south of point A. The road is south of the street. Point B is south of the road. Fred is a man in point A. Fred's journey is a scene. Every turn during Fred's journey: Let thataway be the best route from the location of Fred to Point B; If the player cannot see Fred and the player is not enclosed by Point B, now Fred is in point B; Otherwise try Fred going thataway. Fred's journey ends when Fred is in Point B. Fred's journey begins when the turn count is 2. Test me with "z / z / showme fred / z / showme fred". Test more with "abstract me to point B / z / z / z / z". [abstract basically means "move the noun to the inside of the second noun, and don't do any realism checks." It's a testing command.] Test follow with "z / z / s / s / s".
This assumes that Fred begins in point A and that there’s a route from point A to point B (if there isn’t Fred will get “stuck”). If the player is in Fred’s path, however, they may notice that Fred teleported past them, even if they cannot see him.

that code wouldnt work with the extension im using. thats why.