AddSpell - Actor
Jump to navigation
Jump to search
Member of: Actor Script
Adds the specified spell to this actor.
Syntax[edit | edit source]
bool Function AddSpell(Spell akSpell, bool abVerbose = true) native
Parameters[edit | edit source]
- 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 Value[edit | edit source]
True on success.
Examples[edit | edit source]
; 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