Pretty much as the title says, I’ve tried everything in trying to make the “Battery Power” on the flashlight run out slowly with each event tick. I got the flashlight to be able to run out after a certain period. I also have a widget in the top right corner showing how much power is left in the flashlight (Which, will turn red when the flashlight runs out) Both of those work fine. The issue is that when the for the flashlight is about to run out, one second the bar is full green, the next it’s red. I just can’t figure out how to make it (the word escapes me right now) but smoothly run out instead of all at once. Where at each tick a small bit of green goes away. If that makes sense. The pictures provided show what I can muster.
is your question “how do I blend the color of the bar from green to red” or “how do I make my flashlight fade out its brightness”?
To what did you bind that function in UMG?
How to blend the bar from green to red while the flashlight is in use.
I bind the progress bar to percent (GetPercent_1) and the you can see the blueprint in the second screenshot above.
Progress bars go from 0 - 1. So you need to devide to make it work.
Get you “Power” level and divide by Maximum and then attach to Progress Bar
As mentioned progress bars need to be set in percentages, hence the X 0.01 (100% of 100). If your full battery level is “60” then do 1/60 = 0.017 and thats what you multiply by (divide 1 by the energy number to get the percentage right)
First thing is print your battery level variable to the screen. Is that function working? Is it slowly depleting as you’d expect from whatever your flashlight power is set to initially… so 100 > 98 > 96 > etc? Is this actually working first? When its NOT in use, does it start to replenish itself? All of the depleting and replenishing functions will happen in your charBP or wherever. The bar is going to just be a visual representation. So if the functions are all working as they should then…you can set up the power bar.
See attached on how to set it up
Got it to work, awesome! Thank you guys for your help!
Happy we could resolve it.
Might need your help one day.