Henchmen AI & Ambient music
- Roland Thomas

- Feb 17, 2024
- 2 min read
For the Minion Base, I started out by configuring the Henchmen variant of it, which are the minions of the Villain. To get the AI started I setup a basic AI logic for the Henchman to find the first instance of the Hero, set it as the attack target in the Blackboard and move to it's position.
I also set up a starting point for AI Perception, and whilst doing that I saw that Unreal has options for AI perception to recognise Friends, Enemies and Neutrals. Intrigued if I could use this, I did some research on how to utilise them, and found out that they are settings that are set when coding AI in C++. As I am currently using Blueprints, I can't use them yet so would have to create a workaround. Not a problem, but good to know.



After this I continued to flesh out the Henchmen AI, using a playlist of Unreal AI guides by Ali Elzoheiry on YouTube to inform the process, eventually ended with the AI having a few states, such as Patrolling & Attacking, where it would patrol through target points and if seeing the Hero, chase and shoot to damage the player. At this early stage, the patrol points have to be manually set up and the Attack simply dealing damage to the attack target at a certain point in its animation. Later on I will adjust this system so they generate a patrol path when spawned, and the Attack system will either be an actual projectile, or I will adopt a modifed version of the ranged attackers in Insomniac's Spider-Man (2018), where UI shows that the ranged attack is preparing to attack and the player has options to avoid or stop it.
I then implemented the ability to damage the Henchmen and gave the Henchmen a text display above their heads to show their Health amount, again for replication testing. This was valuable, as it showed that the applied damage from the server wasn't being replicated to the client. I was then able to fix this.
Lastly I added a modified version of Elzoheiry's basic strafing EQS to allow make the henchmen strafe around the player after finding an ideal range to shoot.
Also this week I implemented the first bit of audio in the game. Using audio assets purchased from Humble Bundle, I implemented different ambient music for the Hero and Villain, with a music plugin that can adjust the intensity of the music.


Comments