Week 9 – Creating A Bat Swarm Ability

As all the tasks that I have been assigned are completed, I spoke with my teams lead programmer about some of the tasks of the Trello board that were still outstanding. After speaking with him about some available tasks, I decided to take the task of programming the Bat Swarm Ability.

Bat Swarm Ability

The original plan for the Bat Swarm was to use it as a dodge ability where the player will turn into Bats temporarily and avoid damage. However as there is already a dodge ability we changed this to an offensive ability which would allow the player to deal damage in the area of the swarm.

In order to create the swarm area, I created a Bat Swarm Blueprint that on spawn collects all of the players SOB (Swarm of bats) stats. This would allow the ability to be upgraded through a shop in game and will also make it easier for the designers to alter as they will just need to alter the stats in the Player BP when testing. The stats that we need for this ability are Duration, DPS and the Radius of the swarm.

Then as I was working with some else for the VFX I needed I needed to make it work with the VFX provided, I was given a separate blueprint containing some bats that fly around a centre point inside of the blueprint.

VFX Given: https://www.youtube.com/watch?v=-f65INVrklk

In order to make this ability more effective I Looped the amount of Bat Swarms to spawn and altered their VFX flight speed to 30 in order to make the bats feel as though they are rapidly flying around the player. I settled on 7 Bat swarms to spawn however I made sure to make the “Amount of swarms” a variable in order to make it possible for the designers to increase or decrease the amount that should spawn. I also made some small changes to the speed multiplier ranges of the bats in order make some of the bats slightly faster/slower than other bats to get a better spread of bats.

The final things that I did for this ability was the implementation of damage to enemies within the spawn. I did this by creating a AOE (Area of Effect) Function inside of the Game mode blueprint. This function checks for overlaps in a sphere, depending on the AOE will change whether line of sight is required and so when calling the Spawn AOE Function there is a booleen for checking if LOS (line of sight) is needed. If line of sight is required then it will check to see if a line trace can be done from the centre of the swarm to any overlapped actors. If the actors are hit by the line trace then the ability will deal damage to that pawn. As a final touch for the AOE function I added a debug which allows for the user to set a debug duration and colour which then allows for the AOE bubble to be visible. This can be extremely helpful when trying to find the perfect size for an AOE ability, especially if the VFX has already been created.

Final Ability: https://youtu.be/iteRrGONEbs

Next Steps

As a team our next steps are getting the whole project merged together and to start importing assets and to continue polishing some of the work that has already been completed