• Navmeshes and CNavAreas are missing functions and methods that the wiki says exist?
    0 replies, posted
I am making a Nextbot NPC and for the movement AI I am trying to get it to move to a random point in a radius but make sure it can be pathed to. I have tried just using a random point in a radius and that didn't work well. In the ENT.RunBehaviour method I have the following: [CODE]local navareas = navmesh.Find(self:GetPos(),math.random(50,500),50,25) local navarea,_ = table.Random(navareas) local areapos = navarea:GetCorner(0)[/CODE] However I got an error saying that the method GetCorner was nil. After doing some more digging I found that almost every (haven't quite checked them all) CNavArea method is nil except GetID so I tried to use the navmesh.GetNavAreaByID function with this code: [CODE]local navareas = navmesh.Find(self:GetPos(),math.random(50,500),50,25) local navid,_ = table.Random(navareas) local navarea = navmesh.GetNavAreaByID(navid:GetID()) local areapos = navarea:GetCorner(0)[/CODE] Apparently that function is also nil. So I am wondering if anyone knows why this is happening or if the version of Gmod with these functions/methods is not out yet. Edit: Saw the thread about the next update and found them in the change log.
Sorry, you need to Log In to post a reply to this thread.