Difference between revisions of "OnSpellCast - ObjectReference"
Jump to navigation
Jump to search
imported>Egocarib |
imported>Egocarib m |
||
Line 4: | Line 4: | ||
'''Member of:''' [[ObjectReference Script]] | '''Member of:''' [[ObjectReference Script]] | ||
Event called when a spell is cast by | Event called when a spell is cast by this object reference. | ||
== Syntax == | == Syntax == |
Revision as of 17:46, 17 March 2015
Member of: ObjectReference Script
Event called when a spell is cast by this 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
Notes
- For concentration spells, this event only fires once, at the moment the reference begins casting.