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
Guardians of the Keep
Status | Prototype |
Author | Lilcoin |
Genre | Action, Role Playing |
Tags | Hack and Slash, Tower Defense |
More posts
- Version 0.1.156 days ago
- Version 0.1.057 days ago
- Devlog 3: Joshua Bray84 days ago
- Devlog 3: Nathan Thorpe84 days ago
- Devlog 2: Nathan Thorpe90 days ago
- Devlog 2: Adam Mashaw90 days ago
- Devlog 1: Joshua Bray97 days ago
- Devlog 1: Nathan Thorpe97 days ago
- Devlog 1: Adam Mashaw97 days ago