Background for Skyrim SE
Member of the Actor script
boolfunctionHasSpell(FormakForm)Native

Description

Wiki Description

Checks to see if this actor has the given Spell or Shout.

Documentation Comment

Checks to see if this actor has the given Spell or Shout


Caveats

CK Wiki - Notes

This function only detects whether the actor knows a spell. It will not detect if the actor is under the influence of a spell's effect. For detecting spells that have been cast on or otherwise applied to the actor, use Actor.HasMagicEffect(...).


Parameters

FormakForm

CK Wiki Description

The Spell or Shout to check.


Examples

; Does the player have the super spell?
if (Game.GetPlayer().HasSpell(SuperSpell))
  Debug.Trace("The player has the super spell")
endIf

Auto-Generated Example

Form myForm__akForm

bool returnedValue = myActor__toCallFunctionOn.HasSpell(myForm__akForm)

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.