Base enemy blueprint


Relation of different enemy blueprints.

The creation of enemies in Garden 2 begins from a base enemy blueprint that acts as a parent for all enemies in the game, including bosses. The base blueprint includes all components and code that every enemy uses.

From the base blueprint, a child blueprint is created for each individual enemy, which includes only what is unique to that specific enemy. The individual enemy blueprint requires setting an animation blueprint, but otherwise is ready for use.

Since boss enemies have most of the same functions that normal enemies do, a base boss blueprint is created from the base enemy blueprint that has additional functions that only bosses use.

One of the important actor components of the base blueprint is EnemyStats component, which hosts the enemy's stats (health, attack, etc.) and any functions related to them. At the moment of writing, the functions can alter any given stat between its lowest and maximum value, and find and return the value of the given stat. It also handles changes to health stat when taking damage.

Other components include Unreal's AIPerception, which has the configuration for the AI's sight, and a directionality arrow similar to the player character, but in the enemy's case, it's mostly used for debugging only.

The base blueprint has also a basic AI controller for the enemy, that changes which behavior tree the AI is supposed to be running. I'll probably make a separate post about the AI once I've worked on it a bit more.