Enderal SE
https://mod.pub/enderal-se/38-enderal-se
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.1 KiB
47 lines
1.1 KiB
Scriptname MagicDispelSpellOnHitScript extends ActiveMagicEffect
|
|
{This script forces the selected spell(s) to dispel on hit.}
|
|
|
|
;======================================================================================;
|
|
; PROPERTIES /
|
|
;=============/
|
|
spell Property Spell01 auto
|
|
spell Property Spell02 auto
|
|
spell Property Spell03 auto
|
|
|
|
|
|
;======================================================================================;
|
|
; VARIABLES /
|
|
;=============/
|
|
|
|
Actor TargetActor
|
|
bool bWaitLongEnough
|
|
|
|
;======================================================================================;
|
|
; EVENTS /
|
|
;=============/
|
|
Event OnEffectStart(Actor Target, Actor Caster)
|
|
TargetActor = Target
|
|
utility.wait(0.5)
|
|
bWaitLongEnough = true
|
|
EndEvent
|
|
|
|
Event OnHit(ObjectReference akAggressor, Form akWeapon, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
|
|
|
|
if bWaitLongEnough
|
|
bWaitLongEnough = False
|
|
if Spell01
|
|
TargetActor.dispelspell(Spell01)
|
|
endif
|
|
|
|
if Spell02
|
|
TargetActor.dispelspell(Spell02)
|
|
endif
|
|
|
|
if Spell03
|
|
TargetActor.dispelspell(Spell03)
|
|
endif
|
|
endif
|
|
|
|
endevent
|
|
|
|
|
|
|