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.
32 lines
830 B
32 lines
830 B
3 years ago
|
Scriptname _00E_ApparitionQyraiStanceScript extends activemagiceffect
|
||
|
|
||
|
MiscObject Property _00E_UpdateInventoryItem Auto
|
||
|
GlobalVariable Property _00E_Phasmalist_IsApparitionSummoned Auto
|
||
|
Actor Property PlayerREF Auto
|
||
|
|
||
|
Actor Target
|
||
|
|
||
|
Float Property SPEED_BOOST = 20.0 AutoReadOnly
|
||
|
|
||
|
Event OnEffectStart(Actor akTarget, Actor akCaster)
|
||
|
Target = akTarget
|
||
|
If Target == PlayerREF
|
||
|
Target = None ; Just in case
|
||
|
EndIf
|
||
|
SetBoost(SPEED_BOOST)
|
||
|
EndEvent
|
||
|
|
||
|
Event OnEffectFinish(Actor akTarget, Actor akCaster)
|
||
|
If _00E_Phasmalist_IsApparitionSummoned.GetValue() > 0.0 ; The apparition is not being unsummoned?
|
||
|
SetBoost(-SPEED_BOOST)
|
||
|
EndIf
|
||
|
EndEvent
|
||
|
|
||
|
Function SetBoost(Float fBoost)
|
||
|
If Target
|
||
|
Target.ModAV("SpeedMult", fBoost)
|
||
|
Target.AddItem(_00E_UpdateInventoryItem)
|
||
|
Target.RemoveItem(_00E_UpdateInventoryItem)
|
||
|
EndIf
|
||
|
EndFunction
|