GetEquippedItemType - Actor

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

Member of: Actor Script

Gets the type of item the actor currently has equipped in the specified hand.

Syntax[edit | edit source]

int Function GetEquippedItemType(int aiEquipIndex) native

Parameters[edit | edit source]

  • aiEquipIndex: The equip index from the actor's race to get the type from.

Return Value[edit | edit source]

The type of item equipped in the specified hand, which is one of the following values:

  • 0: Nothing (Hand to hand)
  • 1: One-handed sword
  • 2: One-handed dagger
  • 3: One-handed axe
  • 4: One-handed mace
  • 5: Two-handed sword
  • 6: Two-handed axe
  • 7: Bow
  • 8: Staff
  • 9: Gun
  • 10: Grenade
  • 11: Mine

Added room for new weapon types

  • 24: Magic spell
  • 25: Shield
  • 26: Torch

Examples[edit | edit source]

; Does Bob have a bow in his first equip slot?
if (Bob.GetEquippedItemType(0) == 7) ; 7 is a bow
  Debug.Trace("Bob has a bow in his first equip slot")
endIf

See Also[edit | edit source]