Locking and Unlocking Doors

From the CreationKit Wiki
Revision as of 10:18, 29 November 2011 by imported>Scornett
(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.

See Also