EventSpellCastAt(object, int, int)
Creates an event which triggers a "spell cast at" reaction.
event EventSpellCastAt( object oCaster, int nSpell, int bHarmful = TRUE );
Parameters
oCaster
Caster of the spell.
nSpell
bHarmful
Determines if the spell is harmful to its target. (Default: TRUE)
Description
Returns an event which triggers the "SpellCastAt" script. nSpell is a constant of SPELL_* which specifies the type of spell that is cast.
The parameter bHarmful is returned by GetLastSpellHarmful() in the On Spell Cast At script, oCaster is returned by GetLastSpellCaster(), and nSpell is returned by GetSpellId().
Remarks
This event must then be signaled using SignalEvent.
This doesn't actually cast the spell, it just makes the object that the event is signaled to behave as if it were.
If a spell script doesn't fire any event, then the AI will not even notice a spell was cast (and would only react to damage out of all the effects that could be applied).
Version
1.61
See Also
categories: | Spell Casting Effects Functions | Spells Functions |
constants: | SPELL_* Constants |
author: Charles Feduke, editor: Jasperre, additional contributor(s): Jasperre, Lilac Soul
Send comments on this topic.