OnSpellCastAt

The script attached to this event fires when the object becomes the target of a spell. This can include responses such as casting a spell of the object's own, dying, disappearing, getting stronger (absorbing the magical effect), etc.


Trigger

A spell has been cast at the creature, door, or placeable object.


Function(s)

GetLastSpell() returns the SPELL_* that was cast.
GetLastSpellCaster() returns the object that cast the spell.
GetLastSpellHarmful() returns TRUE if the spell was marked as hostile, FALSE otherwise.
DetermineCombatRound(object, int) for standard combat actions.


Remarks

If a harmful spell has been cast on the creature and that creature is not already in combat, it becomes hostile.


See Also

Objects with Events | Creature | Door | Placeable Object
functions: DetermineCombatRound | GetLastSpell | GetLastSpellCaster | GetLastSpellHarmful


 Send comments on this topic.