Oxygen UI Difficulty

Hey everyone, so currently I have a character controller bp with a few variables called oxygen, Deplete rate, and oxygen max. Basically what I’m trying to achieve is oxygen depleting overtime, which is working. The problem I’m facing is that the oxygen ui is currently updating with the oxygen depletion, it continues to stay at max. I am also tried using the bind function to the fill like the docs has shown. At first i thought maybe the actual depletion of oxygen wasn’t happening so i tried printing the logic and it appears to be working on that end. Any and all help would be appreciated it!

Btw ignore the errors at the bottom, i was playing around with other stuff to try to figure it out, here is the other screen shot of the widget graph

Hi,

The progress bar gets a value between 0-1 (Full progress bar is represented by 1 and an empty one by 0). You need to map your Oxygen value to this range or otherwise, any value outside this range will get clamped and therefore may leave the progress bar unaffected. You can fix this by simply dividing the current value of your oxygen by its maximum possible value before passing it to your progress bar Return node.

Hope this resolves your issue :slight_smile:

yeah that is pretty much what i have, i created the bind and the bar and hooked it up as such and still no luck, it just stays full

I just updated my answer based on the new BP you provided in the comment section. See if your problem can now be resolved.

Thank you! I had no idea it was a 0 to 1. Now I know, again thank you, its working now

You’re very welcome :slight_smile: