AI = Artificial Intelligence/NPC/Computer
Goal: Make a team of AI that are able to scan their environment and take cover so that they are all hiding in the best cover available to them(all of them hiding from multiple enemies) without multiple units trying to hide in the same spot.
This isn't a request or a fix the script type of question, but more me asking for help brainstorming. Working with AI is one of my favorite things to do in studio, and after mastering the basic shoot and follow AI I wanted to move on to more advanced AI. I have already done some research on the problem, and this is what I have come up with so far.
- Make the map static (non destructible/a map that isn't able to change) and manually put in points on every area where the AI could hide.
- Raycast nearby objects and determine a place to hide
- Sort of a modification of number 1, but it detects when objects are destroyed and then updates the points in which the AI could hide.
Jumping into things before I did my research, I already made a simple prototype of number 1, but it wasn't efficient. Just having 10 of the AI was really laggy because each AI had to create a table of the map and iterate thought each part to find the best position to hide behind. I know that if I were to choose number one then I would go back and make one script that makes the table and each AI refer to that script instead of each of them making their own.
I am kinda stuck on where to go on from here. I definitely don't want someone to make the script for me, but I'm not sure which of the three ways is the best. Right now I'm looking for new opinions/ideas before I just choose one. I know this will be challenging, but I wanted to listen to others before I started trying to code this. Any new ideas and/or opinions is greatly appreciated!

2 comments
Lol I already did (https://forum.roblox.com/Forum/ShowPost.aspx?PostID=186527632) , it's just that usually there are smarter responses here.
Just letting you know.