In this article we see a prototype of artificial intelligence for enemies in Unity.
These enemies will be in different states according to what happens during the game. The states are “Guard”, “Searching”, “Attacking”, “Covering”.
The idea for this prototype came about because a person wrote to me in the channel’s comments asking how you could get enemies to detect you, alert each other, warn others and attack.
To answer your question I created a project at Unity proposing an approach to the problem and made a video explaining how this prototype of artificial intelligence for enemies worked. You can see it below.
This is the video I made, in which explain how this prototype works. English Subtitles aren’t available jet, but translating all my content is being my top priority.
Download project files
You can download the project files to import and view the scripts in detail.
What are we gonna do with this?
At the moment it’s just a prototype that I made on a weekend and that meets the problem I was posed.
However everything can be improved, I am thinking of creating a more complex system based on this, improve the code, modularize more, create a better model for the weapon, separate the range of vision of the Enemy Script, improve in general the individual states.