2021-10-05 22:15:58 +00:00
|
|
|
Scriptname _00E_FS_EssenceGiftSC extends activemagiceffect
|
|
|
|
|
2021-10-05 22:59:59 +00:00
|
|
|
_FS_Phasmalist_ControlQuest Property PhasmalistControlQuest Auto
|
2021-10-05 22:15:58 +00:00
|
|
|
|
2021-10-05 22:59:59 +00:00
|
|
|
Message Property _00E_FS_EssenceGift_NoApparition Auto
|
2021-10-05 22:15:58 +00:00
|
|
|
|
2021-10-05 22:59:59 +00:00
|
|
|
Sound Property _00E_FS_Phasmalist_EnterWorld_Male Auto
|
|
|
|
Sound Property _00E_FS_Phasmalist_EnterWorld_Female Auto
|
|
|
|
|
|
|
|
EffectShader Property AbsorbGreenFXS Auto
|
|
|
|
|
2024-02-10 14:05:30 +00:00
|
|
|
float Property fMagnitude Auto
|
|
|
|
|
2021-10-05 22:59:59 +00:00
|
|
|
Event OnEffectStart(Actor akTarget, Actor akCaster)
|
|
|
|
Actor akApparition = None
|
|
|
|
|
|
|
|
If PhasmalistControlQuest.IsApparitionSpawned()
|
|
|
|
akApparition = PhasmalistControlQuest.GetApparitionFailsafeRef()
|
2021-10-05 22:15:58 +00:00
|
|
|
Else
|
2021-10-05 22:59:59 +00:00
|
|
|
_00E_FS_EssenceGift_NoApparition.Show()
|
|
|
|
EndIf
|
|
|
|
|
2024-02-10 14:05:30 +00:00
|
|
|
if SKSE.GetVersion()
|
|
|
|
fMagnitude = GetMagnitude()
|
|
|
|
endif
|
|
|
|
|
|
|
|
if fMagnitude == 0.0
|
|
|
|
fMagnitude = 45.0
|
|
|
|
endif
|
|
|
|
|
2021-10-05 22:59:59 +00:00
|
|
|
If akApparition && akApparition.Is3DLoaded()
|
|
|
|
If akApparition.GetActorBase().GetSex() == 1
|
2021-10-05 22:15:58 +00:00
|
|
|
_00E_FS_Phasmalist_EnterWorld_Female.Play(akApparition)
|
|
|
|
Else
|
|
|
|
_00E_FS_Phasmalist_EnterWorld_Male.Play(akApparition)
|
|
|
|
EndIf
|
|
|
|
AbsorbGreenFXS.Play(akApparition)
|
2024-02-10 14:05:30 +00:00
|
|
|
akApparition.RestoreActorValue("Magicka", fMagnitude)
|
2021-10-05 22:59:59 +00:00
|
|
|
Else
|
2024-02-10 14:05:30 +00:00
|
|
|
akCaster.RestoreActorValue("Magicka", fMagnitude)
|
2021-10-05 22:15:58 +00:00
|
|
|
EndIf
|
|
|
|
EndEvent
|