Locking and Unlocking Doors

From the CreationKit Wiki
Jump to navigation Jump to search

Actors can lock and unlock owned doors on their own.

Locking[edit | edit source]

The normal process of getting actors to lock doors is as follows:

  • Interior cells can be assigned a "Lock List" -- a form list of base actors.
  • When owned doors load, they relock themselves if they are part of a cell with a Lock List.
  • When an actor leaves a cell, if he is in the cell’s Lock List AND was the only actor on the list in that cell, lock all the owned load doors.
  • When a movement procedure starts up that would take an actor out of a cell, if the actor is the last one in the cell’s Lock List, set the cell to a new state which is basically the “Shoo” state. When a cell is in this state, the actor will do the “time for you to leave” interrupt behavior if he detects the player in the cell. As soon as the actor leaves and locks the doors, the cell goes into the “Private” state where it is trespassing to enter it.

We also have a LockDoors procedure which allows a package to lock owned doors as needed.

Unlocking[edit | edit source]

Actors can unlock doors with the UnlockDoors Procedure.

Passing through locked doors[edit | edit source]

Actors other than the player do not need to unlock load doors to travel through them. But they need to be the owner, or be a member of the owning faction, or have the key in their inventory. Otherwise their AI package will not start.

See Also[edit | edit source]