Devlog 2: Andrew Sipes: Working with Base Attributes


"Working With Base Attributes"

Author: Andrew Sipes

Posted on 9/20/24

The Problem:

We decided to use the Ability System for ability to add dynamic abilities and spells quickly to the game. Given the type of the game we are making with around 15-20 spells, adding abilities needs to be as modular as possible. Due to this, part of the hurdles we have ran into was integrating it into the other aspects of the game such as UI, AI, gameplay and Death.  I spent a couple weeks perfecting my understanding of this system in a previous class, however most of my team has not had expierence with it. As as result, I have spent some time showing them how it interacts with all aspects of the Engine and how it will affect their roles and systems.

One of the issues we ran into was converting the Health to use this system, since you can store float values in the Attribute Set, you would use this rather than a Health Component.  While I was offline, my team had difficulties getting the player health to update in its respective UI Widget and to update the Health Attribute when damaged.  I reviewed the blueprint they were working with, and found that they were unable to bind the OnHPChange delegate used that should broadcast on the attribute change.

The Solution:

When using the node "Get Attribute Set" it returns only the parent class rather than the Class you select. This being said, A cast is needed if you want to access any of the functionality of that Attribute Set. Additionally, Attribute Sets are required to be created in C++, requiring an accessor to see the delegate in blueprint.

Once I added the Cast to Base Attribute Set, I was able to use the return as the target for the Bind Event To HPChange. I also needed to verify the attribute set was correct on the Player, and Get Gameplay Attribute Value for the health and maxhealth to resolve the issue. In the end, adding this functionality to the User Interface will improve the the player expierence by allowing them to see their health dynamically update anytime the attribute for health is updated.


Get SpellStorm

Leave a comment

Log in with itch.io to leave a comment.