I’m trying to get an NPC to walk waypoints across two areas. Should be simple but she won’t do it. I have commented in the line for MODULE_SWITCH_ENABLE_CROSSAREA_WALKWAYPOINTS in the module on load script and set the variable X2_SWITCH_CROSSAREA_WALKWAYPOINTS to 1 in the module properties (maybe I should have just done one or the other?). There’s no WP script or other UD events attached to her, just the standard x2_def scripts.
She has two WPs in each area, and #2 is right next to the door in the area she starts in, and #3 is right next to door on the other side. The door transition works fine for the PC. The NPC walks from #1 to #2, then hangs out at #2 for a while (for about the time it would take to walk #3 and #4 and back), then walks back to #1.
I don’t quite get what you are trying to do here, but I’m not familiar with the MODULE_SWITCH_ENABLE_CROSSAREA_WALKWAYPOINTS. You want her to walk from point 1 to 2 in one area, then teleport to a new area and walk from one point to the other there? I mean, the player won’t see her in the other area unless he/she teleports there him/herself so…Why not just do a scripthidden thing of the NPC when she reaches the second point, and make her script hidden there for a while, and then make her visible again for the illusion of her going to the new area?
Or are the two “areas” in the same area perhaps? Maybe I’m not understanding this correctly.
Thanks andgalf! Yes they are two different areas. In theory NPCs can walk a waypoint path that crosses areas, much like they do Day and Night WPs in different areas. The switch is in the default mod_load file and the string const is in x2_inc_switches. A couple of posts refer to it working, including in the nwn2wiki. I could script but since this is supposed to work I want to see if I can get it to.
Ok, well since I’m obviously unaware of this “function” I’m afraid I can’t help you. Maybe someone else here with deeper knowledge of the game like kevL_s, Lance Botelle or travus can help you.
Thanks KevL_s. I’m working my way through the various functions that control it. It’s of course possible that the area transition part was not implemented in NWN2. Some of the script notes refer to it being changed and disabled in various patches for NWN1.