Background for Skyrim SE
Member of the Actor script
SpellfunctionGetEquippedSpell(intaiSource)Native

Description

Wiki Description

Gets the spell the actor currently has equipped in the specified source.

Documentation Comment

Gets the spell currently equipped in the specified source
0 - Left Hand
1 - Right Hand
2 - Other
3 - Instant


Caveats


Parameters

intaiSource

CK Wiki Description

The source to get the spell from.

  • One of the following values is acceptable:* 0:Left hand
    • 1:Right hand
    • 2:Other
    • 3:Instant

Examples

; Does Bob have fireball in his left hand?
if (Bob.GetEquippedSpell(0) == FireballProperty)
  Debug.Trace("Bob has fireball in his left hand")
endIf
; Does Bob have a Greater Power equipped that takes up the Voice slot?
if (Bob.GetEquippedSpell(2) == GreaterPowerProperty)
  Debug.Trace("Bob has a Greater Power equipped as a Shout")
endIf
;To get the equipped spell that requires both hands:
if (PlayerRef.GetEquippedSpell(0) && PlayerRef.GetEquippedSpell(1) == LightningStormProperty)
  Debug.Trace("Player has Thunderbolt in both hands.")
endif

Auto-Generated Example

int myInt__aiSource

Spell returnedValue = myActor__toCallFunctionOn.GetEquippedSpell(myInt__aiSource)

Related Pages


Additional References

View this function’s page on the Skyrim Creation Kit Wiki

Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.