Locking and Unlocking Doors

From the CreationKit Wiki
Revision as of 11:23, 15 August 2016 by imported>Thorskin
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Actors can lock and unlock owned doors on their own.

Locking

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

Actors can unlock doors with the UnlockDoors Procedure.

Passing through locked doors

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