Background for Fallout 4
Member of the Actor script
boolfunctionAddSpell(SpellakSpell, boolabVerbose=true)Native

Description

Wiki Description

Adds the specified Spell to this actor.

Documentation Comment

Adds the specified spell to this actor - returns true on success


Caveats


Parameters

SpellakSpell

CK Wiki Description

The Spell to add to this actor.

boolabVerbose=true

CK Wiki Description

Pass false to suppress UI messages for spells added to the player. Spells added to NPCs never result in a UI message.

  • Default:True

Examples

; 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

Auto-Generated Example

Spell mySpell__akSpell
bool myBool__abVerbose

bool returnedValue = myActor__toCallFunctionOn.AddSpell(mySpell__akSpell, myBool__abVerbose)

Related Pages


Additional References

View this function’s page on the Fallout 4 Creation Kit Wiki

Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.