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.179 days ago
- Version 0.1.080 days ago
- Devlog 3: Joshua BrayAug 30, 2024
- Devlog 3: Nathan ThorpeAug 30, 2024
- Devlog 2: Nathan ThorpeAug 24, 2024
- Devlog 2: Adam MashawAug 23, 2024
- Devlog 1: Joshua BrayAug 17, 2024
- Devlog 1: Nathan ThorpeAug 17, 2024
- Devlog 1: Adam MashawAug 17, 2024