Difference between revisions of "GetEquippedSpell - Actor"
Jump to navigation
Jump to search
imported>Terra Nova m (→Examples) |
imported>Enter 77 (Added example for "Other") |
||
(One intermediate revision by one other user not shown) | |||
Line 28: | Line 28: | ||
endIf | endIf | ||
</source> | </source> | ||
<br> | |||
<source lang="papyrus"> | |||
; 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 | |||
</source> | |||
<br> | |||
<source lang="papyrus"> | <source lang="papyrus"> |
Latest revision as of 12:08, 27 March 2014
Member of: Actor Script
Gets the spell the actor currently has equipped in the specified source.
Syntax[edit | edit source]
Spell Function GetEquippedSpell(int aiSource) native
Parameters[edit | edit source]
- 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
- One of the following values is acceptable:
Return Value[edit | edit source]
The spell currently equipped in the specified source.
Examples[edit | edit source]
; 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