Scriptname _00E_FS_Entropy_CorpseExplosionSC extends activemagiceffect Event OnEffectStart(Actor akTarget, Actor akCaster) akVictim = akTarget EndEvent Event OnDying(Actor akKiller) float fDamage = akVictim.GetBaseAV("Health")/2 _00E_FS_Entropy_CorpseExplosionEnchantment.SetNthEffectMagnitude(0, fDamage) ExplodeVisuals() EndEvent Function ExplodeVisuals() _00E_FS_Entropy_CorpseExplosionFXS.Play(akVictim) akVictim.SetCriticalStage(akVictim.CritStage_DisintegrateStart) ObjectReference objKillMarker = akVictim.PlaceAtMe(XMarker) objKillMarker.MoveTo(akVictim, 0.0, 0.0, 50) Utility.Wait(0.3) _00E_FS_Entropy_CorpseExplosionIMOD.Apply() If _00E_CorpseExplosionRaceList.Find(akVictim.GetRace()) >= 0 objKillMarker.PlaceAtMe(_00E_BloodyArmMisc, 2) objKillMarker.PlaceAtMe(_00E_BloodyLegMisc, 2) objKillMarker.PlaceAtMe(_00E_BloodyRibsMisc) objKillMarker.PlaceAtMe(_00E_BloodySkullMisc) EndIf _00E_FS_CorpseExplosionM.Play(akVictim) Utility.Wait(0.1) objKillMarker.PlaceAtMe(_00E_FS_Entropy_CorpseExplosionEXP) akVictim.AttachAshPile(_00E_CorpseExplosionPile_Remains) akVictim.SetAlpha(0.0, true) akVictim.Kill(Game.GetPlayer()) akVictim.SetCriticalStage(akVictim.CritStage_DisintegrateEnd) objKillMarker.Delete() EndFunction Activator Property _00E_CorpseExplosionPile_Remains Auto Formlist Property _00E_CorpseExplosionRaceList Auto Static Property XMarker Auto Actor akVictim Sound Property _00E_FS_CorpseExplosionM Auto MiscObject Property _00E_BloodyArmMisc Auto MiscObject Property _00E_BloodyLegMisc Auto MiscObject Property _00E_BloodyRibsMisc Auto MiscObject Property _00E_BloodySkullMisc Auto EffectShader Property _00E_FS_Entropy_CorpseExplosionFXS Auto ImageSpaceModifier Property _00E_FS_Entropy_CorpseExplosionIMOD Auto Enchantment Property _00E_FS_Entropy_CorpseExplosionEnchantment Auto Explosion Property _00E_FS_Entropy_CorpseExplosionEXP Auto