enderalse/source/scripts/_00e_fs_accerleratesc.psc

50 lines
1.5 KiB
Plaintext

Scriptname _00E_FS_AccerlerateSC extends ActiveMagicEffect
;=====================================================================================
; EVENTS
;=====================================================================================
Event OnEffectStart(Actor akTarget, Actor akCaster)
float fMagnitude = Self.GetMagnitude()
fSpeedBonus = akCaster.GetAV("Speedmult")*fMagnitude/100
akCaster.ModAV("Speedmult", fSpeedBonus)
_00E_StealthFXShader.Play(akCaster)
_00E_FS_AccelerateIMOD.Apply()
UpdateSpeed(akCaster)
EndEvent
Event OnEffectFinish(Actor akTarget, Actor akCaster)
akCaster.ModAV("Speedmult", -fSpeedBonus)
MAGAlterationTelekinesisThrow.Play(akCaster)
_00E_StealthFXShader.Stop(akCaster)
UpdateSpeed(akCaster)
EndEvent
Function UpdateSpeed(Actor Caster)
; what is this suppossed to do even????????
if Caster.HasSpell(_00E_Vision_UpdateAb)
Caster.RemoveSpell(_00E_Vision_UpdateAb)
EndIf
Caster.AddSpell(_00E_Vision_UpdateAb, False)
Utility.Wait(0.1)
Caster.RemoveSpell(_00E_Vision_UpdateAb)
EndFunction
;=====================================================================================
; PROPERTIES
;=====================================================================================
float fSpeedBonus
EffectShader Property _00E_StealthFXShader Auto
ImageSpaceModifier Property _00E_FS_AccelerateIMOD Auto
Sound Property MAGAlterationTelekinesisThrow Auto
Spell Property _00E_Vision_UpdateAb Auto