Get attacker/killer from HitInfo?Solved
void OnEntityDeath(BaseCombatEntity entity, HitInfo info)
        {
            if (entity == null | info == null)
                return;

            

            if (entity.ShortPrefabName == "heavyscientist")
            {
                Puts("Heavy Scientist killed");
            }
            if (entity is ScientistNPC)
            {
                Puts("Scientist was killed");
            }
            if (entity.ShortPrefabName == "murderer")
            {
                Puts("Murderer was killed");
            }
            if (entity.ShortPrefabName == "scarecrow")
            {
                Puts("Scarecrow killed");
            }
        }

How would i find out what player killed the npc? And is there a way that i could count how many of each type of npc the player has killed?

info.InitiatorPlayer
Locked automatically