Download

(Solved) Stamina widget progress bar displaying wrong fill percent

Hi! I implemented a stamina system for my player character and would like it to be displayed in a progress bar. I have it setup as follows:

Widget event pre construct:

Binding on the progress bar percent:

I divided the integer by 100 but as soon as I run the progress bar goes from 1 to 0. When the stamina reaches 100 again it fills to 1. I tried binding a textblock to the stamina and that seemed to work just fine.

Any hints on what I can do to fix this?

Convert to float before the division maybe?..

2 Likes

You can use this nice node:

1 Like

That fixed it, thanks heaps!