Brehanin Posted April 1, 2012 Share Posted April 1, 2012 Hi everyone, any help you can provide would be greatly appreciated! I am working on making my vampire mod more immersive, and I would like to have NPCs which I make into vampires turn into ash piles upon death.I already have it working so that when I (the player) die I run into ash, I can make it so when I kill my own vampire "converts" they turn into ash, HOWEVER . . . if another NPC kills one of the NPCs I turned into a vampire they will not turn to ash >< Is there something I can change in the script I apply to my NPC turned vampires to make this happen?Here is the script I use for myself and the NPCs I change:___________________________________________________ scriptName magicAttachAshPileOnVampireDeath extends ActiveMagicEffect{Scripted effect for on death ash pile} import debugimport FormList ;======================================================================================;; PROPERTIES /;=============/ float property fDelay = 1.00 auto {time to wait before Spawning Ash Pile}; float property fDelayAlpha = 1.65 auto; {time to wait before Setting alpha to zero.}float property fDelayEnd = 1.65 auto {time to wait before Removing Base Actor}float property ShaderDuration = 0.00 auto {Duration of Effect Shader.}Activator property AshPileObject auto {The object we use as a pile.}EffectShader property MagicEffectShader auto {The Effect Shader we want.}Bool property bSetAlphaZero = True auto {The Effect Shader we want.}FormList Property ImmunityList auto {If the target is in this list, they will not be disintegrated.}Bool property bSetAlphaToZeroEarly = False Auto {Use this if we want to set the acro to invisible somewhere before the effect shader is done.} ;======================================================================================;; VARIABLES /;=============/ actor Victimrace VictimRacebool TargetIsImmune = True; bool DeadAlready = FALSE ;======================================================================================;; EVENTS /;=============/ Event OnEffectStart(Actor Target, Actor Caster) victim = Target ; DeadAlready = Victim.IsDead() trace("victim == " + victim + ", is this right?") EndEvent Event OnDying(Actor Killer) victim.SetCriticalStage(Victim.CritStage_DisintegrateStart) ;victim.SetAlpha (0.99,False) MagicEffectShader.play(Victim,ShaderDuration) if bSetAlphaToZeroEarly victim.SetAlpha (0.0,True) endif utility.wait(fDelay) Victim.AttachAshpile(AshPileObject) ; AshPileRef = AshPileObject ; AshPileRef.SetAngle(0.0,0.0,(Victim.GetAngleZ())) utility.wait(fDelayEnd) MagicEffectShader.stop(Victim) if bSetAlphaZero == True victim.SetAlpha (0.0,True) endif utility.wait(fDelayEnd) EndEvent ___________________________________________________ Link to comment Share on other sites More sharing options...
Recommended Posts