Difference between revisions of "GetEquippedSpell - Actor"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Sagitarius22
imported>Terra Nova
Line 27: Line 27:
   Debug.Trace("Bob has fireball in his left hand")
   Debug.Trace("Bob has fireball in his left hand")
endIf
endIf
</source>
<source lang="papyrus">
;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
</source>
</source>



Revision as of 16:44, 23 December 2013

Member of: Actor Script

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

Syntax

Spell Function GetEquippedSpell(int aiSource) native

Parameters

  • aiSource: The source to get the spell from.
    • One of the following values is acceptable:
      • 0: Left hand
      • 1: Right hand
      • 2: Other
      • 3: Instant

Return Value

The spell currently equipped in the specified source.

Examples

; Does Bob have fireball in his left hand?
if (Bob.GetEquippedSpell(0) == FireballProperty)
  Debug.Trace("Bob has fireball in his left hand")
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

See Also