Difference between revisions of "OnSpellCast - ObjectReference"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Jlundin
 
imported>Egocarib
Line 25: Line 25:
endEvent
endEvent
</source>
</source>
== Notes ==
*For concentration spells, this event only fires once, at the moment the reference begins casting.


== See Also ==
== See Also ==
*[[ObjectReference Script]]
*[[ObjectReference Script]]

Revision as of 21:31, 24 April 2014

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

Notes

  • For concentration spells, this event only fires once, at the moment the reference begins casting.

See Also