AddSpell - Actor

Member of: Actor Script

Adds the specified spell to this actor.

SyntaxEdit

bool Function AddSpell(Spell akSpell, bool abVerbose = true) native

ParametersEdit

  • akSpell: The spell to add to this actor.
  • abVerbose: Pass false to suppress UI messages for spells added to the player. Spells added to NPCs never result in a UI message.
    • Default: True

Return ValueEdit

True on success.

ExamplesEdit

; Adds the sheep spell to the player
if (Game.GetPlayer().AddSpell(SheepSpellProperty))
  Debug.Trace("Sheep spell added to the player")
endIf


; Adds the sheep spell to the player, silently
if (Game.GetPlayer().AddSpell(SheepSpellProperty, false))
  Debug.Trace("Sheep spell added to the player (like a ninja!)")
endIf

See AlsoEdit