Background for Fallout 4
Member of the ObjectReference script
KeyfunctionGetKey()Native

Description

Wiki Description

Obtains the Key that unlocks this object (or None if the object does not have a key, or is not lockable).

Documentation Comment

Returns the key base object that will unlock this object


Caveats


Examples

; Add the key to unlock this door to the player's inventory
Key JailKey = JailDoor.GetKey()
Game.GetPlayer().AddItem(JailKey)

Auto-Generated Example

Key returnedValue = myObjectReference__toCallFunctionOn.GetKey()

Related Pages


Additional References

View this function’s page on the Fallout 4 Creation Kit Wiki

Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.