Mod:Creation Kit/OnSpellCast - ObjectReference

Member of: Mod:Creation Kit/ObjectReference Script

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

Syntax
Event OnSpellCast(Form akSpell)

Parameters

 * akSpell: Spell that was cast. Can be  Spell,  Enchantment,  Potion, or  Ingredient.

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