I'm new to Papyrus and I am creating a script that checks if the player killed the actor.
If so, it will do something. If not, it will resurrect my actor.
But, I don't know how to properly do this. At least, it is not working.
Here is my code:
Scriptname A_LodronsBOSSLich_Death extends ObjectReference {handles the WHOLE BOSS!}Actor Property Player AutoInt Property BossKiller Auto Conditional ; 0 = unset, 1 = player, -1 not the playerInt Property AResurrected == 1 Auto ConditionalSpell Property REVIVESPELL AutoEvent OnDeath(Actor akKiller)BossKiller == 0BossKillerWho()if BossKiller == -1 if AResurrected == 1 ;do nothing here else REVIVESPELL.Cast(Self, Self) AResurrected == 1 endif else Debug.Trace("Not killed by player, can't revive boss.")endIfEndEVENTFunction BossKillerWho(); check if the player killed the boss or something elseif Player == Game.GetPlayer() BossKiller == 1 Debug.Trace("Player killed the boss.") else BossKiller == -1 Debug.Trace("Something else killed the boss.")endIfEndFunctionI'd appreciate if you could help me.
I guess the Player Property isn't working as intended.
Thanks in advance.

