GetKey - ObjectReference

Revision as of 17:49, 21 October 2011 by imported>Jlundin (→‎Examples)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Member of: ObjectReference Script

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

SyntaxEdit

Key Function GetKey() native

ParametersEdit

None.

Return ValueEdit

The Key that will unlock this object. If the object is not lockable, it will return None.

ExamplesEdit

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

See AlsoEdit