OnSpellCast - ObjectReference

Member of: ObjectReference Script

Event called when a spell is cast by the object reference.

SyntaxEdit

Event OnSpellCast(Form akSpell)

ParametersEdit

ExamplesEdit

Event OnSpellCast(Form akSpell)
  Spell spellCast = akSpell as Spell
  if spellCast && spellCast == FireballSpell
    Debug.Trace("We just cast a fireball!")
  else
    Debug.Trace("We cast something, but we don't know what it is")
  endIf
endEvent

NotesEdit

  • Carried over from Skyrim, this is still a valid event as many actors in Fallout 4 use spells not obvious to the player.

See AlsoEdit