Background for Skyrim SE
Member of the ObjectReference script
intfunctionGetOpenState()Native

Description

Wiki Description

Obtains this object's current "open state".

Documentation Comment

Gets the open state of this object. Which can be one of the following:
0 - None
1 - Open
2 - Opening
3 - Closed
4 - Closing


Caveats

CK Wiki - Notes

  • Will return even on doors with no animations, but doesn't work on AutoLoadDoors (cave entrances).

Examples

; Is this door open or opening?
int openState = JailDoor.GetOpenState()
if (openState == 1 || openState == 2) ; Open or opening
  Debug.Trace("Door is open!")
endIf

Auto-Generated Example

int returnedValue = myObjectReference__toCallFunctionOn.GetOpenState()

Related Pages


Additional References

View this function’s page on the Skyrim Creation Kit Wiki

Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.