Jump to content

Looking for help for a script


Kmikaz3

Recommended Posts

Hi,

 

Im looking for a script that allow you to cast a custom made spell (summon undead) once the target is dead similar to Soul trap where you can only absorb soul once they're dead

 

This is what will happen when the target die with soul trap

 
Event OnEffectFinish(Actor Target, Actor Caster)
; victim = target
; trace(self + " is finishing")
; if Caster.TrapSoul(victim) == true
; trace(victim + " is, in fact, dead.  Play soul trap visFX")
; TrapSoundFX.play(Caster)       ; play TrapSoundFX sound from player
; TrapImod.apply()                                  ; apply isMod at full strength
; TargetVFX.Play(victim,4.7,Caster)              ; Play TargetVFX and aim them at the player
; CasterVFX.Play(Caster,5.9,victim)
; TargetFXS.Play(victim,2)     ; Play Effect Shaders
; CasterFXS.Play(Caster,3)
; else
; trace(victim + " ``is, in fact, dead, But the TrapSoul check failed or came back false")
; endif
; endEvent


 
This is what im trying to do with the similar effect with the script below but instead of Soul Trap its a custom made spell (summon undead)
Spell Property OnDeathSpell Auto 
 
Event OnEffectStart(Actor Target, Actor Caster)
OnDeathSpell.cast(Target,Target)
 
EndEvent
ty
Kmikaz3
Edited by Kmikaz3
Link to comment
Share on other sites

So basically you want a spell that you can cast on an actor and if that actor dies before the spell ends, then they come back as an undead?

Spell Property OnDeathSpell Auto 
 
Event OnEffectFinish(Actor Target, Actor Caster)
 If(Target.isDead() && !Caster.isDead())
  OnDeathSpell.cast(Caster,Target)
 endIf
 
EndEvent

should work. It might try to shoot the spell from the player to the corpse, which would look weird. i don't have time to test it. If it doesn't work you can PM me, and I'll try to take some time to make a version that works.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...