EquipSpell - Actor

From the CreationKit Wiki
Jump to navigation Jump to search

Member of: Actor Script

Forces the actor to equip the specified spell in the specified source.

Syntax[edit | edit source]

Function EquipSpell(Spell akSpell, int aiSource) native

Parameters[edit | edit source]

  • akSpell: The spell to force the actor to equip.
  • aiSource: The source to equip the spell into.
    • One of the following values is acceptable:
      • 0: Left hand
      • 1: Right hand
      • 2: Voice (use this for Powers)
    • aiSource is required, but it will be overridden by the Spell's Equip Slot if it is set to anything other than BothHands in the editor.

Return Value[edit | edit source]

None.

Examples[edit | edit source]

; Forces bob to equip ward into his right hand
Bob.EquipSpell(WardProperty, 1)


; Equip the Beast Form power. Note that WerewolfChange's Equip Slot must be set to Voice.
Bob.EquipSpell(WerewolfChange, 2)

Notes[edit | edit source]

  • If the calling actor does not have akSpell, it will be given to them.
Game.GetPlayer().EquipSpell(BoundBow, 1) ; Gives BoundBow to player if they don't have it

See Also[edit | edit source]