1. Does anyone know how I can identify these for a plugin? Are they BasePlayer, BaseNpc?
     
  2. i would say Npc

    Code:
    5696 - assets/prefabs/npc/murderer/gloweyes.item.prefab
    5697 - assets/prefabs/npc/murderer/gloweyes.wearable.prefab
    5698 - assets/prefabs/npc/murderer/murderer.population.asset
    5699 - assets/prefabs/npc/murderer/murderer.prefab
    5700 - assets/prefabs/npc/murderer/murderer_corpse.prefab
    5701 - assets/prefabs/npc/murderer/sound/breathing.asset
    5702 - assets/prefabs/npc/murderer/sound/breathing.prefab
    5703 - assets/prefabs/npc/murderer/sound/death.asset
    5704 - assets/prefabs/npc/murderer/sound/death.prefab
     
  3. NPCMurderer
    Base Type: NPCPlayerApex / NPCPlayer
     
  4. if (entity is NPCMurderer)
    return;

    Will this return truthy?
     
  5. NPCMurderer is in the assembly as a Class, i would just try it , u should see if the compiler accepts it or not :s
     
  6. here is a snip from my plugin where I deal with npc:

    else if (entity as BasePlayer != null)
    {
    if (entity is NPCMurderer) // Murderer (treated the same as zombies)
    {
    setHitScale(hitInfo, _Zombiemodifiers);
    }
    else if (entity is NPCPlayer) // Scientists, etc.
    {
    setHitScale(hitInfo, _NPCmodifiers);
    }
    else // Player
    {
    setHitScale(hitInfo, _Playermodifiers);
    }
    }

    Bonus, zombies:

    else if (entity as BaseNpc != null)
    {
    if (entity.ShortPrefabName == "zombie") // Zombie
    {
    setHitScale(hitInfo, _Zombiemodifiers);
    }
    else // Animal
    {
    setHitScale(hitInfo, _Animalmodifiers);
    }
    }
     
  7. this is what I use.

    Before checking if it is any other kind of NPC or if it is a player
     
  8. I would suggest this instead:
    if ((entity as BasePlayer != null && entity is NPCMurderer) || entity is NPCPlayerApex)

    As it is seems safer to establish they are a BasePlayer before check if they are an NPC.
    return; will return null as you have not specified a return value.
    return true;
    that would return true;

    (Wulf just told me about NPCPlayerApex so added it)
     
    Last edited by a moderator: Nov 29, 2017