Moving a door to the player?

Post » Fri Feb 18, 2011 6:31 pm

Alright, here is my problem. I have NPCs that execute packages at 12 every morning to move to an NPC Marker, which I have placed in an Interior cell that I made. Now, the only way into this cell is through a portal that the player must summon.

Since the player summons the door that leads to the room where the NPC Marker is , the TeleportMarker Gets messed up, and the NPCS won't go through the door to get the NPC Marker - so I use SetDoorTeleport to correct it. This results in the player being able to go to and from the teleporter just fine, however, the NPCS still dont know how to go through the portal with the updated teleport settings.

Does this make any sense?

Basically, I summoned a load door, updated the teleport settings, since the originals get messed up when you move a load door. Even though I used a script effect to update the teleport reference NPCS don't know to use that door to get into the Cell where I've placed their marker.

I really really need some help with this one

The doors are persistant references.
User avatar
Vivien
 
Posts: 3530
Joined: Fri Apr 13, 2007 2:47 pm

Post » Sat Feb 19, 2011 2:34 am

NPC AI does not deal well with moving doors.
From my tests a year ago, I remember that, if I moved a door, the NPC would go to some weird location (like world position 0,0) and activate the door from there (fade out)

What you may do is splitting the AI package: (1) Travel to the door (at current position), (2) have the NPC activate the door (maybe script the door for proximity) and (3) when the NPC is in the destination cell, a second Travel package to the final destination.
User avatar
Janette Segura
 
Posts: 3512
Joined: Wed Aug 22, 2007 12:36 am

Post » Fri Feb 18, 2011 6:11 pm

Could you add a second door for the NPC to use instead of the summoned door (could make it activate only if they were a member of a new faction to keep other NPCs from using it or require a key in their inventory) or add a quest script onto the NPC that moved them to\from the cell at the correct time of day and have them run the AI package after they have been moved by script ?
User avatar
Penny Courture
 
Posts: 3438
Joined: Sat Dec 23, 2006 11:59 pm

Post » Fri Feb 18, 2011 10:00 pm

That's a really good idea....it's ashame that there isn't a simple way to do this. The problem is that the NPCS are generic, and there are a good deal of them. Im allowing the player to make their base in any location that they want to. The AI Packages give the NPCS life. when its time for them to practice spells, they travel to an area the PC designates. So doors are bound to move depending on the player. What I might be able to do is add scripts to them for onpackagestart to test if their marker is in that cell - and if it is I could add a different package to them so that they activate the door instead. This will get them to the correct area, at least I think It will.

I wonder if I could make an NPC act like a door somehow....but then the NPCs wouldn't know know to activate the NPC door to get to their location naturally..
User avatar
Rachel Tyson
 
Posts: 3434
Joined: Sat Oct 07, 2006 4:42 pm

Post » Sat Feb 19, 2011 1:01 am

Keep in mind that a door can be activated from anywhere with the activate function.

If you don't need to see the NPC walking to the door, you may just make them activate the door from wherever they are (Door.Activate NPC 1) so they get to the destination cell and, then, add the package to the destination marker.
User avatar
Marina Leigh
 
Posts: 3339
Joined: Wed Jun 21, 2006 7:59 pm


Return to IV - Oblivion