GetOpenKey
From The Elder Scrolls Construction Set Wiki
A command for Oblivion Script Extender
Syntax:
(key:ref) reference.GetOpenKey
Returns the key used to unlock the calling reference.
Example
ref pDoor
ref pKey
...
set pDoor to DoorRef
set pKey to pDoor.GetOpenKey
if (pKey == 0)
set pDoor to pDoor.GetLinkedDoor
if pDoor
set pKey to pDoor.GetOpenKey
endif
endif
if pKey
...
Checks DoorRef and it's linked door for the key.
[edit] Notes
- The bug was fixed with v0013a. Make sure to use the latest version.
- This function has a bug in v0013 that causes CTDs in interior spaces.
- The key reference is only set on one side of the door. If a reference isn't returned, then check it's linked door with
ref pDoor ref pKey ;DoorRef is a Reference Editor ID of a door ... set pDoor to DoorRef.GetLinkedDoor set pKey to pDoor.GetOpenKey

