Welcome to Our Website - Your Source for Information!

Articlepedia.org

Welcome back to another installment of our ongoing series on creating smart enemy AI in game development.

Date Published:

Author:

Welcome back to another installment of our ongoing series on creating smart enemy AI in game development. In this segment, we will delve into the exciting process of building a new mage enemy character from scratch. Unlike our previous tutorials that utilized default character models from Unreal Engine, this time we will be working with a custom mesh from Mixo, along with custom animations, to demonstrate how to create a fresh enemy character complete with an animation blueprint.

Our mage enemy will feature an intriguing teleportation ability, allowing them to execute teleportation attacks similar to those performed by the player character. Additionally, they will be able to move around the player, utilizing a teleport and attack sequence. But that's not all - when their health is diminished, the mage can also heal themselves before resuming their teleportation and attack patterns.

To begin, we need to acquire a suitable mesh and animations for our mage enemy. We will be using a character called "Katuin" from Mixo, although it may not appear inherently mage-like. However, we are confident that we can make it work for our purposes. The necessary animations can be sourced from the Mixim mage character. These include walking and running animations in all directions, attack animations, a hit reaction animation, and a jump animation.

Once we have retrieved the mesh and animations, we can proceed with our character creation. The mesh and animations should be placed within the characters folder in the content directory. Specifically, the mesh can be found in characters > Mage, while all the animations are located in the same directory. Feel free to refer to the descriptions for each animation in the video description and download the project files and assets from Patreon.

Alongside the animations, we have prepared a blend space to handle the character's locomotion. This blend space, known as the Locomotion Blend Space, incorporates the character's direction and speed. While we won't go into the details of creating a blend space, there are numerous tutorials available on this topic.

Now that we have acquired the necessary mesh, animations, and blend space, it's time to proceed with creating our enemy character. To do this, navigate to the enemies folder, right-click on the base, and select "Create a new child." Let's name our new enemy character "BP Enemy Mage". Opening up the character, we can replace the default mesh with our mage mesh by right-clicking on the mesh component and selecting the appropriate option. It is important to note that the Mixo model appears larger than the mannequin, so we recommend scaling it down to ensure consistency with other enemy characters.

With our enemy mesh now attached to the actor, we can place it in the game world. However, nothing will happen at this stage as we have yet to create the animation blueprint and behavior tree. There is still much work to do, so let's move on.

Next, we will turn our attention to creating the animation blueprint. This step was requested by many viewers who wanted to avoid using the standard mannequin blueprint. By constructing a custom animation blueprint, we can cater to their needs. To begin, navigate to the characters > Mage > Animations directory. Right-click within the folder and search for "animation blueprint." Selecting the option, you will be prompted to choose the desired skeleton. Opt for the SK Mage skeleton to proceed.

In conclusion, this tutorial has provided an overview of the initial steps involved in building a mage enemy character from scratch. We selected a custom mesh from Mixo, gathered animations for the character's movements and actions, and replaced the default mesh with our chosen mage model. Before we can witness the mage's teleportation abilities and sophisticated attack patterns, we must first create an animation blueprint and a behavior tree. In the next installment, we will explore these aspects in detail to bring our mage enemy to life.

Stay tuned for the next part of our series, where we delve further into the creation of our mage enemy AI.