Close and lock doors

Close and lock doors
This can be done with the script above with just on added line of code. Keep in mind that the door can’t lock until after it is closed. So the Lock command must be delayed as well.

Add this script to the doors OnOpen script handle. Change the number 15.0f to whatever. 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(15.0f,ActionCloseDoor(OBJECT_SELF)); DelayCommand(15.5f,SetLocked(OBJECT_SELF,TRUE)); } // End