Jump to content

[LE] summon spell script help required


Recommended Posts

Here's an example of my resurrection script, which if cast on a target that is alive that is not essential will kill them.

scriptName z2013mjhNPCResurrectionScript extends activemagiceffect

;-- Properties --------------------------------------

;-- Variables ---------------------------------------

;-- Functions ---------------------------------------

function OnEffectStart(Actor Target, Actor Caster)

	if Target.IsDead()
		debug.Notification("The magic shocks the target back to life.")
		Target.Resurrect()
		Target.Disable(false)
		Target.Enable(false)
	else
		debug.Notification("The magic overburdens the target and kills it.")
		Target.Kill(none)
	endIf
endFunction

Now because you're summoning an NPC, you'll want to use instead of Target a property that references your NPC, so your chance for death is applied to the right target, as the way this one is built it effects an npc where the projectile hits.

Once you have your targeting resolved, you can call it in the script as such AlexRussianRouletteSummon01.Kill() and it should kill your summon.

 

Another script you could look at is the one attached to mehrunes dagon's dagger that has a 1% chance for an instant kill on your target.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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