Difference between revisions of "EquipItemById - Actor"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>SniffleMan
(Added page)
 
imported>SniffleMan
 
Line 14: Line 14:
== Parameters ==
== Parameters ==
*item - The Form of the item to equip.
*item - The Form of the item to equip.
*itemId - The FormID of the item to equip.
*itemId - The hash of the item to equip.
*equipSlot - The slot you wish to equip the item to.
*equipSlot - The slot you wish to equip the item to.
**Default Slot = 0
**Default Slot = 0

Latest revision as of 03:02, 23 March 2019

SKSE Member of: Actor Script

Forces this actor to equip the specified item to the specified slot.

Syntax[edit | edit source]

Function EquipItemById(Form item, int itemId, int equipSlot = 0, bool preventUnequip = false, bool equipSound = true) native

Parameters[edit | edit source]

  • item - The Form of the item to equip.
  • itemId - The hash of the item to equip.
  • equipSlot - The slot you wish to equip the item to.
    • Default Slot = 0
    • Right Hand Slot = 1
    • Left Hand Slot = 2
  • preventUnequip - If true, will prevent unequipping of the item for the actor.
  • equipSound - If true, no sound will be played on the equip.


Examples[edit | edit source]

;Force the player to equip swordProperty to the Default slot
Game.GetPlayer().EquipItemEx(swordProperty, swordProperty.GetFormID())


; Force Ralof to equip a Dagger to his Left hand and do not suppress the sound.
Ralof.EquipItemEx(DaggerProperty, DaggerProperty.GetFormID(), 2, false, false )

Notes[edit | edit source]

See Also[edit | edit source]