void OnEntityDeath(BaseCombatEntity entity, HitInfo info)
{
if (entity == null | info == null)
return;
var player = info?.InitiatorPlayer;
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");
}
}I was told that i should use a data file to store how many kills of each type of npc a player has. I am not sure on how to do this. Can anyone help me?