Can't figure out how to make power bar smoothly run out, rather than all at once.
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 time 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 time 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.
asked Jul 01 '15 at 07:50 AM in Blueprint Scripting
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
answered Jul 01 '15 at 09:34 AM
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 max 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
answered Jul 01 '15 at 09:47 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here