When either of them die I want to activate character1 or person1 respectively. I wrote this script and attached it to the actors
How ever I think self may not work correctly here as they are not replaced ?
Scriptname ZZDragondead extends Actor
ObjectReference Property Character1 Auto
ObjectReference Property Character2 Auto
ObjectReference Property Person1 Auto
ObjectReference Property Person2 Auto
Event OnDeath(Actor akKiller)
if Self == Character2
Character1.enable()
if (akKiller == Game.GetPlayer())
(Character1 as Actor).startcombat(game.getplayer())
Debug.Trace("Character2 was killed by the player!")
endif
endIf
if Self == Person2
Person1.enable()
if (akKiller == Game.GetPlayer())
(Person1 as Actor).startcombat(game.getplayer())
Debug.Trace("Person2 was killed by the player!")
endif
endIf
endEvent
