Jump to content

How to make creatures unable to go through doors?


Recommended Posts

I'm working on a training center mod that I hope to release at some point, and so far I've encountered one thing that really is a problem.

 

In the two rooms that have leveled creatures that will attack back when you attack them, I've found that if I aggro them at me and don't knock them out so their aggro resets, they'll follow me out of the room to keep attacking. This is a big problem because once you kill them in the other room, they'll stay there, as they are essential. So they won't appear in their correct room again without you going to the effort of leading them back in. This isn't too much of an issue for me personally, but I want to make this training center user-friendly as possible since I plan to release it.

 

So I was wondering if there's a way of either making it so only the player can pass through certain doors, or if once the player leaves a cell the creatures will reset aggro and won't try to follow.

Link to comment
Share on other sites

How about setting the door to be owned by the player and having the lock level be 100?

 

If that doesn't work, you can try adding the creatures to some faction and putting this script on the doors:

 

scn doorscript

ref npcref

Begin OnActivate

set npcref to GetActionRef
if (npcref.GetInFaction SomeFaction) == 0
	Activate
endif

End

 

It should prevent anyone/thing from that faction from using the door. But the thing is, I don't think that the script gets checked when you're no longer in the room, so it'll activate anyway...

 

If that's the case, maybe you should just have it be a fake door. That way, only the player would use it. Just have it be a door that isn't linked to another door, and put this script on it:

 

scn doorscript

ref npcref

Begin OnActivate

set npcref to GetActionRef
npcref.MoveTo RefID

End

 

RefID would be the reference ID of the door you originally had it linked to.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...