OnSpellCast - ObjectReference

From the CreationKit Wiki
Revision as of 10:29, 16 August 2010 by imported>Jlundin
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Member of: ObjectReference Script

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

Syntax

Event OnSpellCast(Form akSpell)

Parameters

Examples

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

See Also