View Full Version : NPC's opening doors
Tilar
12-24-2009, 10:12 PM
Is there a way to get an NPC to open a door instead of walking through it?
trevius
12-24-2009, 11:10 PM
Are you talking about for aggro'd NPC's, or for pathing NPCs?
I don't think there is a simple way to do it for aggro'd NPCs, but I have found that it isn't hard to make them do it for pathing NPCs.
What I do is make the pathing so that they pause for 1 second right outside the door before going through, and again pause for 1 second after going through it. This way, if they are patrolling through the door, they will pause for 1 second before trying to enter the door, no matter which direction they are coming from. Don't ask me why it works, but just by adding in the brief pause like that, it will let the door open before they walk through it. I haven't messed with it in a while, but that is how I have gotten it to work in the past.
I am sure you could also use scripting to do it if you wanted to be a bit more in-depth. But, pathing is probably the easiest way.
Lillu
12-25-2009, 03:50 AM
heh, thats great to know Trev. Gonna try that out. Thanks! :)
ChaosSlayerZ
12-25-2009, 12:47 PM
from what I observe, npc DO open doors as they pas throw them. The thing is, they do not wait for the door to open, they walk THROUGH them as door is still opening. Thats why you add 1 sec stop point before and after the door, to make it look real as if the mob has opened the door =)
However when mobs is aggroed through the door, he does NOT always runs DIRECTLY through the door passage, in which case, the door is not triggered.
cavedude
12-25-2009, 01:01 PM
I've seen NPCs walk through opening doors on Live as well, so we aren't far off. Still, the extra pause suggestion is a good one :)
Tilar
12-25-2009, 05:55 PM
Yes it is for pathing NPC's. That pause worked pretty good for what I'm doing, Thanks.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.