Any alternative to using SetFacing to fix the "always face east" bug?
Melkior
Member Posts: 216
Module makers will be aware that there is still a bug in the current version of NWN1 which causes every NPC standing at a waypoint to turn and face East after reaching the post.
I've found a sort-of work-around for the bug by placing a variable on the post waypoint which makes the NPC turn to match the waypoint's "facing" angle. The problem with this "solution" is that the NPCs often do a "part-turn-shuffle" as they begin to face East and then immediately turn to face the waypoint again. It looks silly because the NPCs should just stand there.
What I want to know is whether anyone has found a better work-around for the problem? Or better yet, whether there's a permanent fix for the problem, which I just haven't found yet?
I've found a sort-of work-around for the bug by placing a variable on the post waypoint which makes the NPC turn to match the waypoint's "facing" angle. The problem with this "solution" is that the NPCs often do a "part-turn-shuffle" as they begin to face East and then immediately turn to face the waypoint again. It looks silly because the NPCs should just stand there.
What I want to know is whether anyone has found a better work-around for the problem? Or better yet, whether there's a permanent fix for the problem, which I just haven't found yet?
0
Comments
I ask because both official and custom WalkWayPoints seem to be working for me.
There is a little trick, which might help: Have the NPC walk up the waypoint. The last command in command stack should be a jump to the destination. After this "micro-jump" the facing of the PC should be aligned with the facing of the waypoint.
What I'm talking about is that if you create a NPC in a game and give them a POST_ waypoint to stand at (with the name POST_ followed by the NPC tag), the NPC will go to stand at that post from whatever distance and then promptly turn and face east.
By playing a bit in mp modules, I get the impression that there's a way around the problem. I'm unsure how it's being done, though. Maybe the NPCs have been given zero movement speed (immobile) and have no post to move to? Maybe they just have the walkwaypoints commented out in their scripts? I really don't know. I'd rather not thrash around blindly trying to discover a workaround for the problem. I'd rather know for sure how to get rid of it altogether, if possible.
I'm unsure if the problem is hard-coded or scripted, though. Is the walkwaypoints function bugged with a rogue command, or is the game engine itself doing this? I simply don't know. I only discovered the sort-of workaround because I was searching the walkwaypoints include file to try to find if it had any rogue commands which might be causing the problem.
And yes, I'm quite sure there is a real problem. I'm only uncertain where it exists, and I'm puzzled that few other people seem to have noticed it. I've noticed it in every module I make and in every module which I play online, although it seems to be inconsistent even within the same module when I'm online which makes me wonder if some NPCs are not using post waypoints and instead have only been made immobile.
The only reason why I'm not pulling my hair out with frustration is that I can't spare any.
I've been searching through all of the functions and sub-functions in the include files but I can't find anything in any of them which might cause the "face east at post waypoints" fault, yet. I'm going to keep on looking, but I don't hold out a lot of hope.
It's looking more and more like it might be a game engine bug.
TR
This seems to me to be further evidence that the "always face east" bug is in the game engine, not just in a script.
TR
This variable must be placed on the waypoint, not on the NPC, and the waypoint must face the direction you want the NPC to face.
The easiest way to do this is to create a custom POST waypoint in the module editor and add the above variable to the blueprint, then use that waypoint blueprint for all of your NPC posts instead of using the default waypoint.
There is no need for custom scripting if you do it this way.