Devlog 3: Adam Mashaw


Problem: Assigning Attributes to the Player HUD

One big issue that I have had over the course of this week has been trying to assign the player attributes to the HUD. It was easy to assign damage to the player attributes, and easy to assign damage dealt to the HUD, but because the player regenerated health, there wasn't an easy way to tie those updates to the player to the HUD.


Solution: Lambdas

The solution that ended up working was using lambdas within the HUD to call the display health function every time that the player gets a change to any of the attributes, to ensure that everything gets caught.

using the function in the first image, I was able to get every time any attribute within the player get altered, and from that alteration, set the percentage of the health bar using the NUMERIC_VALUE macro I created. 


Get Guardians of the Keep