I’m building a demo for a game I’m working on, however when working on the health bars for the UI, a few issues occur.
- When the game starts, the health bar immediately fills. For reference, the max health is 100 and current health starts at 25.
- When the health is updated using the updatehealth function, two things happen: if the player’s health is reduced, it goes to 0, if it goes up, it goes to 1.
- The progress bar does nothing but care if the player has above 0 health or not, rather than being representation by a percentage.
Here’s my current setup:
Player UI Get_Health_percent
UpdateHealth Function:
This is what’s seen on the player’s screen.
Begin play: See that the currenthealth is being displayed as 25.0
Reduce health: it goes to zero, when the health is only reduced by 5.
Increase Health: the player’s health goes up by 5. goes to 1 instead.
Something has to setup improperly, or my health variable is being mucked with by the progress bar. Any ideas?





