Jump to content

Closing Doors


Strifur

Recommended Posts

I'm using a castle mod with several NPCs who continuously walk from room to room leaving the doors always open. Could someone explain how I can make the doors close automatically in the CS? From what I've seen in other mods, such as Glenvar Castle, I believe I need to use an Activator (like TrigZone01) yet I'm not familiar with how those work and the online tutorials apparently are not helping. Thanks in advance for the help!
Link to comment
Share on other sites

I made a small mod to test how to have automatically closing doors. The approach you mention does work but can be buggy. If a door has a slow animation, the trigger won't work while the animation is playing and the door could be left in the wrong state until the animation is over and the trigger happens to be tripped again. (And it could potentially trigger to do the wrong thing like close in your face as you approach it.) You can adjust where you put your trigger zones, but if you have a slow door with trigger zones far from it in order to compensate, then an NPC might loiter between the trigger zone and the door and the behavior of the door would come out wrong.

 

The better solution seemed to be to make the doors to be like the doors at the Arcane University that automatically close after five seconds. I chopped down that script to remove stuff about Mage Guild membership, and here it is:

 

SCN AASelfClosingDoor

; Object script applied to various doors with unique form IDs that lazy NPCs always leave open behind them.

Float Timer

Begin Gamemode

if ( GetOpenState == 1 )
if ( timer < 5 )
	set timer to ( timer + GetSecondsPassed )
else
	SetOpenState 0
	set timer to 0
endif
endif

End 
  

 

This script is written in a bizarre and counter-intuitive fashion and could be written in alternate ways, but it was written by a professional at Bethesda and it works, so I left it alone.

 

To use this, you would need to rename all the styles of doors in your castle with unique form IDs so you can modify them without accidentally changing all the doors in Tamriel. You then pick this script from the pull-down menu of possible scripts when you have the window open concerning the details of one of your unique door objects.

 

If you need more help understanding what I am saying or would like me to e-mail you the mod, just send me a personal message.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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