Introducing Hero units to Tower Defense Starter Kit

Heroes in Tower Defense Starter Kit are special units that can be controlled by the player and can be given orders to move around the map. This makes them more versatile than the Tower Guardians which are temporarily spawned reinforcement units that can only defend the area around their spawn location.

The Hero unit was first added in the v2.20 update for Tower Defense Starter Kit and has since received additional features including a dedicated UI button for player interaction, a cooldown based respawning system, and a passive health regeneration ability.



The 2.20 edition of Tower Defense Starter Kit also introduced a dedicated Hero Manager class that serves a purpose similar to that of the Tower Manager for Towers. The Hero Manager is an actor class blueprint that can be added to your map and contains parameters for customizing the Hero class as well as their respawn times.

Creating your own custom Hero Unit

1. Create a new child class from BP_FriendlyAI_Hero.

2. Override the Config variables, character mesh and if required, the default behavior of the BP_FriendlyAI_Hero functions (see screenshot below) in your new child Hero blueprint.

3. Select the Hero Manager from your level and change the Hero class to the new Hero you just created through the drop down menu. You can also move the Hero Manager actor around to set a new spawn location for your Hero unit.

Now you should have your very own Hero unit ready to fend off the enemy waves. Just click play and you should see the default Hero replaced with your new custom Hero unit.

 

And with that, we've come to the end of this post. I will be adding more features to flesh out Hero system like for example, the ability to gain experience through combat and level up over time. There are also plans to add a Hero selection panel to the pre mission loadout menu, similar to how loadout selection is handled right now for Towers and Global Abilities. More on that coming soon.

Comments