InterruptCast - ObjectReference
Revision as of 10:35, 24 February 2012 by imported>Terra Nova (→Examples)
Member of: ObjectReference Script
Interrupts and stops any spell-casting this object might be doing.
Syntax
Function InterruptCast() native
Parameters
None.
Return Value
None.
Examples
; Stop this flame trap from casting
FlameTrap.InterruptCast()
;This script example is extending from activemagiceffect.
;The idea is to interrupt a spell the target has.
;properties
Spell property IceStorm1 auto ; spell chosen in the property window is Ice Storm
;akTarget = the enemy this spell effect will be placed on.
Event OnEffectStart(Actor akTarget, Actor akCaster)
if akTarget.HasSpell(IceStorm1) ;if the target has a certain spell, you would like to interrupt, use a conditional.
akTarget.InterruptCast() ;then it will be interrupted by this line.
endif
EndEvent
The result is if the enemy attempts to cast the spell Ice Storm, he will be unable to complete the cast.
Very useful for enemies that use wards spells - it will still appear briefly but they will be unable to "turtle" with it because of the script.