
corpse disintegrate
By:
Mellen on
Feb 18th, 2013 | syntax:
None | size: 1.16 KB | hits: 30 | expires: Never
Scriptname DisintegrateCorpses extends activemagiceffect
EffectShader Property pShader Auto
;easy way of setting the shader effect we want to use
Event OnEffectStart(Actor akTarget, Actor akCaster)
;start doing the stuff listed below whenever this spell hits something
;akTarget tells the game what the spell hit, akCaster tells it who cast the spell
Bool aretheydead = akTarget.IsDead()
;sets a variable to either 1 or 0, depending on whether the thing that the spell hit is dead
If aretheydead == 1
;start doing the stuff listed below only if the thing above turned out to be 1
pShader.play(akTarget)
;apply the shader effect you set in the properties to the unfortunate victim
akTarget.AttachAshPile()
;put a lootable ash pile under the corpse
Utility.Wait(3.0)
;give the effects a few seconds to finish so that everything looks pretty
akTarget.SetAlpha (0.0)
;make sure the corpse is fully invisible, to prevent things looking weird
akTarget.ForceRemoveRagdollFromWorld()
;sends the ragdoll off to the scary room so that nothing will bump into it
Else
;otherwise, if it's not dead, fuck it all and do nothing
EndIf
EndEvent