I’m giving my enemy idle movement, and currently I’ve gotten it to walk between a few set points. But the thing is, this is too linear and predictable for what I wish to achieve. I want it to move randomly by creating a point to move to that pops up on a random location somewhere on the map, and then create a new one once that one has been reached. While also making sure that it doesn’t try to walk to an area it cannot reach.
However I have no idea how to code this. I tried looking it up, but found nothing. There was one example that seemed to do what I wanted, but it was written in C#, and as a stubborn Javascript user that made it useless since I couldn’t translate it.
So does anyone know how this can be done? Making the AI create randomly placed walkable points to walk to, preferably also within a defined area so that I can also use this to make it search a smaller area after losing sight of the player?