One last problem with my project

Post » Fri May 27, 2011 7:32 pm

The NPC's in my project, when I load it in game, have a tendency to face the walls. This is not at all like the way I have them placed in the editor. Is there a way to fix their behavior so they no longer look at walls?
User avatar
herrade
 
Posts: 3469
Joined: Thu Apr 05, 2007 1:09 pm

Post » Sat May 28, 2011 8:34 am

This usually happens with NPCs that have no Wander package, or Wander set at zero.
First, make sure the NPC does have the Wander package, but set the Distance at 0 if you don't want them moving.

Set some Path Grids near the NPC. Even if they don't walk around, it can keep them facing the right direction. (Path Grids are also handy for anyone using Companion mods, to prevent them from getting stuck.)
User avatar
Prisca Lacour
 
Posts: 3375
Joined: Thu Mar 15, 2007 9:25 am

Post » Sat May 28, 2011 9:51 am

How odd...
Have you attached any scripts directly to them? Perhaps a script is resetting their positions?
I've never had this happen to me, my NPCs always point the way I tell them to...

Do they always face a certain direction? Have you tried placing them near different walls to see if they face them?
If they always face a certain way, you could try placing them on the opposite side of the room. Maybe that could help.

I've heard of modders having trouble with NPC positions when they aren't placed carefully.
As a tip, make sure that anytime you place an NPC, you place them slightly above the floor, rather than directly on it.

Morrowind has some minor issues with collision, which can cause problems for "live actors". (Creatures and NPCs)
For example, the infamous "floating glitch" which can cause some NPCs in interiors to literally "float away".
(Like Sharn gra-Muzgob, which can break the early parts of the main quest, when/if that happens.)
(Note: Accoring to the UESPWiki, the "Morrowind Patch Project" fixes her glitch.)

I don't know if that is the cause of your problems, but it's still a good idea to place NPCs slightly above the ground.
Morrowind's engine will put them down on the floor properly for you.
(Don't place them higher off the ground than about half a foot, though.)

I hope this will help you. ^_^

Edit: It looks like Pluto ninja'd me. ;)
I figured you would have already done that.

But yeah, you should be sure to properly path-grid your cells, especially if you have complex cell layouts.
A proper path-grid should help you with the NPC positioning as well.
User avatar
Michelle Smith
 
Posts: 3417
Joined: Wed Nov 15, 2006 2:03 am

Post » Sat May 28, 2011 3:01 am

Will the NPC's always face a path grid or the player if I set one? I have all of them positioned above the floor, and there is a script that happens when the cell is entered that calls the resetactors command, and in the editor none of them are facing the wall. They must be turning that way automatically.
User avatar
Gemma Archer
 
Posts: 3492
Joined: Sun Jul 16, 2006 12:02 am

Post » Sat May 28, 2011 12:05 am

A path-grid makes it so that the AI can find it's way through an area without getting stuck.

Regardless, I'm not sure what to tell you. I've never seen your particular problem before...
User avatar
Justin Bywater
 
Posts: 3264
Joined: Tue Sep 11, 2007 10:44 pm

Post » Sat May 28, 2011 4:39 am

Will the NPC's always face a path grid or the player if I set one? I have all of them positioned above the floor, and there is a script that happens when the cell is entered that calls the resetactors command, and in the editor none of them are facing the wall. They must be turning that way automatically.

A Path Grid should cause NPCs (with Wander set to zero) to keep facing the right direction.
Staring North is a common bug that occurs with the AI, usually after a few Idles have fired and the NPC attempts to Wander... this is why all NPCs should have a Wander package even if they never walk anywhere. (just set it at zero)

Make sure you do have a Northmarker in the cell. Not using one might also cause this bug, too.
User avatar
JLG
 
Posts: 3364
Joined: Fri Oct 19, 2007 7:42 pm


Return to III - Morrowind