GetOpenState - ObjectReference
From Creation Kit
Member of: ObjectReference Script
Obtains this object's current "open state".
int Function GetOpenState() native
The current "open state" of the object. Will be one of the following:
- 0: None (object can't be opened or closed)
- 1: Open
- 2: Opening
- 3: Closed
- 4: Closing
; Is this door open or opening? int openState = JailDoor.GetOpenState() if (openState == 1 || openState == 2) ; Open or opening Debug.Trace("Door is open!") endIf
- Will return even on doors with no animations, but doesn't work on AutoLoadDoors (cave entrances).