Difference between revisions of "InterruptCast - ObjectReference"
Jump to navigation
Jump to search
InterruptCast - ObjectReference (edit)
Revision as of 10:34, 24 February 2012
, 10:34, 24 February 2012→Examples
imported>Jlundin (Created page with 'Category:Scripting Category:Papyrus '''Member of:''' ObjectReference Script Interrupts and stops any spell-casting this object might be doing. == Syntax == <source …') |
imported>Terra Nova |
||
Line 21: | Line 21: | ||
FlameTrap.InterruptCast() | FlameTrap.InterruptCast() | ||
</source> | </source> | ||
<br> | |||
<source lang="papyrus"> | |||
;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 the conditional below. | |||
akTarget.InterruptCast() ;then it will be interrupted by this line. | |||
endif | |||
EndEvent | |||
</source> | |||
The result is if the enemy attempts to cast the spell Ice Storm, he will be unable to complete the cast.<br> | |||
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. | |||
== See Also == | == See Also == | ||
*[[ObjectReference Script]] | *[[ObjectReference Script]] | ||
*[[Cast - Spell]] | *[[Cast - Spell]] |