Scientistnpc_patrol : HumanNPCNo Thanks
Hello. you can add a plugin to fix the ability for scientists to walk outside their mouth area?
assets/rust.ai/agents/npcplayer/humannpc/scientist/scientistnpc_patrol.prefab failed to sample navmesh at position (22.5, 34.4, 594.4) on area: HumanNPC

I don't have the skills to repair the navmesh or transfer the navmesh from the animals to them. Here is what I tested - maybe it will be useful:

public void OnEntitySpawned(BaseEntity entity)
{
if (entity is ScientistNPC)
{

ScientistNPC sm = (entity as ScientistNPC);
sm.GetComponent<BaseNavigator>().DefaultArea = "Walkable";
sm.NavAgent.areaMask = 1;

var areNPC = sm.GetComponent<BaseNavigator>().DefaultArea;
var areNAV = sm.NavAgent.areaMask;
Debug.Log("reNPC: " + areNPC);
Debug.Log("areNAV: " + areNAV);

}
}

Hi,

You are in the Better Scarecrow help plugin section, your post seems unrelated.

You should post in the Plugin Request forum.

We can not repair the navmesh afterwards, it's built automatically by the game engine when the server is started.

Also, you can create a OnEntitySpawned(ScientistNPC) function directly instead of doing a cast (with this, you are sure that the entity is valid and with the correct type when called)

Locked automatically