FANDOM


This can be done with the script below with just an added line of code. Keep in mind that the door can't lock until after it is closed. Therefore, the Lock command must be delayed as well.

Add this script to the door's OnOpen script handle. Change the number 600.0f to any number; this is the delay in seconds before the door closes. The Word TRUE will lock the door. FALSE will Unlock the door. OBJECT_SELF represents the object that the script is attached to--in this case, the door.

/////////////////////////////////////////////////////////
// Auto-Close Door / Lock Door
/////////////////////////////////////////////////////////
void main()
{
	DelayCommand(600.0f,ActionCloseDoor(OBJECT_SELF));
	DelayCommand(600.5f,SetLocked(OBJECT_SELF,TRUE));
}
// End

Builders might note that doors that close and lock a short period of time after being opened can impact combat, as the door's closing may separate party members, block ranged attacks, or prevent repositioning. Even outside combat, quickly re-locking doors can annoy players, particularly when spells, thieves' tools, or other items are required to re-open a just-opened door.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.