GetEquippedObject - Actor

From the CreationKit Wiki
Revision as of 00:20, 1 June 2013 by imported>Bot Owned (Created page with "Category:Scripting Category:Papyrus Category:SKSE '''SKSE Member of:''' Actor Script Returns the object currently equipped in the specified location. == Synt...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

SKSE Member of: Actor Script

Returns the object currently equipped in the specified location.

Syntax[edit | edit source]

Form Function GetEquippedObject(int location) native

Parameters[edit | edit source]

  • location - The slot to check.
    • Left Hand = 0
    • Right Hand = 1
    • Shout = 2

Return Value[edit | edit source]

The Form of the object currently equipped.


Examples[edit | edit source]

Actor PlayerRef = Game.GetPlayer()
Form EquippedItem = PlayerRef.GetEquippedObject(0) ; Check Left Hand

If !EquippedItem
	Debug.Trace("Player did not have any item in their left hand.")
ElseIf (EquippedItem as Weapon)
	Debug.Trace("Player has a Weapon in their left hand")
ElseIf (EquippedItem as Spell)
	Debug.Trace("Player has a spell in their left hand")
Else 
	Debug.Trace("Player was wielding an object in their left hand.")
EndIf


Notes[edit | edit source]

None

See Also[edit | edit source]