enderalse/source/scripts/_00e_fs_essencegiftsc.psc

43 lines
1.1 KiB
Plaintext

Scriptname _00E_FS_EssenceGiftSC extends activemagiceffect
_FS_Phasmalist_ControlQuest Property PhasmalistControlQuest Auto
Message Property _00E_FS_EssenceGift_NoApparition Auto
Sound Property _00E_FS_Phasmalist_EnterWorld_Male Auto
Sound Property _00E_FS_Phasmalist_EnterWorld_Female Auto
EffectShader Property AbsorbGreenFXS Auto
float Property fMagnitude Auto
Event OnEffectStart(Actor akTarget, Actor akCaster)
Actor akApparition = None
If PhasmalistControlQuest.IsApparitionSpawned()
akApparition = PhasmalistControlQuest.GetApparitionFailsafeRef()
Else
_00E_FS_EssenceGift_NoApparition.Show()
EndIf
if SKSE.GetVersion()
fMagnitude = GetMagnitude()
endif
if fMagnitude == 0.0
fMagnitude = 45.0
endif
If akApparition && akApparition.Is3DLoaded()
If akApparition.GetActorBase().GetSex() == 1
_00E_FS_Phasmalist_EnterWorld_Female.Play(akApparition)
Else
_00E_FS_Phasmalist_EnterWorld_Male.Play(akApparition)
EndIf
AbsorbGreenFXS.Play(akApparition)
akApparition.RestoreActorValue("Magicka", fMagnitude)
Else
akCaster.RestoreActorValue("Magicka", fMagnitude)
EndIf
EndEvent