function that gets who killed actor in OnEffectfinish event?

Post » Fri Jun 26, 2015 10:43 pm

I am doing this:
Event OnEffectfinish(Actor akTarget, Actor akCaster)
if attacker == playerref || me == playerref
if HitLocation == 1
if me.isdead()
HeadShotMessage()
endif
endif
endif
endevent
Is there anyway to detect if the player was the one that killed the actor on an "effect finish" event where the spell stops because the actor is dead?
I have already tried On Dying and On Death event in the spell but sometimes the spell stops BEFORE the on dying will fire.
So I need some kind of function that grabs who killed the actor in the OnEffectfinish event.
Edit: OH FOR PETE SAKE I found it :
GetKiller - Actor
Sorry, I will ask for this to be closed.
User avatar
Kayleigh Mcneil
 
Posts: 3352
Joined: Thu Jun 29, 2006 7:32 am

Return to V - Skyrim

cron