How does my AI work?

I have added 4 states for my AI and each one of them are connected with each other.The four states are listed below:

1. Patrol : The AI patrols around the scene by finding a new random point to move to on the walkable area on the surface.

2. Chase : If the player is in the range, it will start following the player.

3. Attack : If the player is in the attack range, which is a really close range then the AI will start attacking the player.

4. Dead: If the player attacks the AI, the AI will die.

All of these 4 states are connected with each other and each of those states are called depending on the situations. The AI starts in the patrol state and roams around finding the new point to move to all the time and if the player comes into its range, the AI will go into the chase state and it will start following the player as long as the player is in range and as soon as the player is not in range the AI will go back to patrol state. Moreover, If the player is really close to the AI, the AI will go into the attack state and start attacking the player as long as the player is still in the range. It will transition back to patrol or chase state depending on where the player is, once the player is out of attack range. Lastly, the AI will die and go into a dead state if the player fires the gun at it. The AI can die in any of the three states(Patrol, Chase, Attack) if the player fires the gun at it.

How is my scene set up?

I have set up my scene as a basic training level. There is a shooting range, where the player can practice their shooting skills. There are different assets like trees, rocks, cones, crates, a car and a plane to decorate the level. There are different other assets like slopes and stairs for the player to run around and learn the movement mechanics.

Controls

Use WASD to Move

Use LMB to Shoot

Use Mouse Scroll Wheel to Change The Weapon

Published 3 days ago
StatusPrototype
PlatformsHTML5
Authorvedant1122
GenreSimulation
Made withUnity
Tags3D, Experimental, First-Person, Short, Singleplayer

Leave a comment

Log in with itch.io to leave a comment.