1. Hello, Im trying to get a list of nearby animals, and im having trouble with the NPCAI / NpcAI class I see in used in others scripts.

    NpcAI is not recognized, and NPCAI complains about a missing "BARust_Animal".

    Here's my code :

    Code:
    List<BaseEntity> list = new List<BaseEntity>();
    Vis.Entities<BaseEntity>(pl.eyes.position,3f, list);
    foreach (BaseEntity be in list) {
        NPCAI npc = be.gameObject.GetComponent<NPCAI>;
        if (npc != null) Puts("ai found");
    }
    Am i missing something ?
    [DOUBLEPOST=1467593291][/DOUBLEPOST]Edit : Nevermind, im an idiot.
    be.gameObject.GetComponent<NPCAI>();

    Re-edit: Spoke too soon, still have the BARust_Animal error in the Oxide server console.
     
    Last edited by a moderator: Jul 4, 2016
  2. You need to post the full error
     
  3. Finally found the fix, no idea how it works tough.

    I thought the following lines at the very top of others plugins where developper comments, turns out they are required :

    // Reference: RustBuild
    // Reference: Behave.Unity.Runtime
     
  4. Wulf

    Wulf Community Admin

    //Reference is used to reference a DLL that isn't loaded already for plugins. Generally the only DLLs that get loaded are those in use by Oxide.
     
  5. Thank you Wulf. I have to say you're doing an excellent job at supporting your community, you seem to be present and helpfull in most if not all threads. I dont think Ive ever seen a developer so supportive.