I'm trying to remove a certain item from a dead unit. But I don't know how to get the dead unit.
I want to attach the script to unit types (all the guards in my cell), then when a guard dies run the script to remove a certain item from the guard.
I looked through the wiki and so far my script looks like this:
Event OnDeath(Actor akKiller) if (akKiller == Game.GetPlayer()) RemoveItem(BM_GuardScimitar, 1, true, none) endIfendEvent
I "stole" this code from the wiki and realized that the killer doesn't have to be the player, so long as the script runs when the guard dies. -To prevent the player from looting the scimitar.
