×
Fallout Wiki
☢  Independent Fallout Wiki Resources  Vault logo

AddSpell - Actor

Resource:Creation Kit > AddSpell - Actor


Member of: Resource:Creation Kit/Actor Script

Adds the specified spell to this actor.

Syntax[edit]

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

Parameters[edit]

  • 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]

True on success.

Examples[edit]

; 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 Also[edit]