Enemy AI Mechanics – Kelsey 09/20/2023
As a team we wanted the enemy AI to target the base and the player. We wanted the enemy to when spawned head for the base and attack the base to take it down. We also wanted that when the player is near to head for and attack the player. There were many problems trying to implement this. The enemy would only sometimes head for the base, the enemy wouldn’t acknowledge the player’s presence, and the enemy would only attack the player if they were close to the base.
The solution to this was to use Booleans, collision spheres, and on component begin overlap functions. As a default we had the enemy as soon as they were spawned head to the base. The way we did this was by making a sphere collider that was large enough to always have a built base within it. On the component begin overlap for this collider we had a function that had the AI move to the base. We then had a smaller collider that would allow the AI to attack the base, this would allow the AI to attack the base if close enough. For following the player, we started by implementing it the same way but realized we needed to set Booleans for base attacking and player attacking that way the AI would know to either or. After seeking the player, we also had to add a second attack call inside of the player attack collider so that the AI could attack the player even away from the base.
Get MystiMayhem
MystiMayhem
Mysti Mayhem is an action RPG where the player uses magic abilities to defeat monsters in different parts of her realm.
Status | In development |
Author | lotuslions |
Genre | Role Playing, Action |
Tags | 3D, Unreal Engine |
More posts
- Enhanced Input for Inventory -Kelsey 12/13/2023Dec 14, 2023
- Enemy Projectile Overlapping - Kelsey 12/06/2023Dec 07, 2023
- Fixing Enemy AI Aiming - Kelsey 11/29/2023Nov 30, 2023
- Player Model Animation Blueprint - Kelsey 11/15/2023Nov 15, 2023
- Enemy Projectiles - Kelsey 11/8/23Nov 09, 2023
- Enemy Death Animations -Kelsey 11/1/23Nov 01, 2023
- Enemy Defense Mechancis - Kelsey 10/13/2023Oct 14, 2023
- GPU Driver Crash - Kelsey 09/29/2023Sep 30, 2023
- Unreal C++ Errors – Kelsey 09/15/2023Sep 15, 2023
Leave a comment
Log in with itch.io to leave a comment.