4
Fork 0
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.
 
 
 

62 lines
1.7 KiB

Scriptname _00E_A1_StOilSlippingBoxScript extends activemagiceffect
Import _00E_TalentLibrary
;=====================================================================================
; EVENTS
;=====================================================================================
Event OnEffectStart(actor akTarget, Actor akCaster)
Victim = akTarget
;---------------DETERMINE TALENT LEVEL---------------------
int PowerLevel = GetTalentLevel(_00E_A1_STOilWord01, _00E_A1_STOilWord02, _00E_A1_STOilWord03)
if PowerLevel == 1
ActualSlow = Level01Slow
elseif PowerLevel == 2
ActualSlow = Level02Slow
elseif PowerLevel == 3
ActualSlow = Level03Slow
endif
;---------------SLOW AND PUSH ENEMY---------------------
if doOnce == 0
Victim.ModActorValue("SpeedMult", -ActualSlow)
Game.GetPlayer().PushActorAway(Victim, 0.01)
doOnce = 1
endif
EndEvent
Event OnEffectFinish(actor akTarget, Actor akCaster)
Victim.RestoreActorValue("SpeedMult", ActualSlow)
;Debug.Notification("Effect finished.")
EndEvent
;=====================================================================================
; PROPERTIES
;=====================================================================================
Float Property Level01Slow Auto
Float Property Level02Slow Auto
Float Property Level03Slow Auto
int doOnce
Float Property ActualSlow Auto Hidden
MagicEffect Property _00E_A1_ShadowtongueOil_HazardME Auto
Sound Property _00E_A1_StOil_SlippingSoundMarker Auto
WordOfPower Property _00E_A1_STOilWord01 Auto
WordOfPower Property _00E_A1_STOilWord02 Auto
WordOfPower Property _00E_A1_STOilWord03 Auto
int Timer
Actor Victim