Honestly probably just setting this up wrong but I’m going nuts here.
I have a handful of progress bars and a randomized system that gives you either better or worse stats every time you start. So I’m working with one of the bars (Energy) and when I set the energy variable connected to the bar to above 100 (so say 300), it will fill the bar to 100% and only be at 100 of 300, then continues to ‘fill’ as I add energy despite being at 100% filled.
How do I get it to scale the percentage with the overall amount?
A clamp? Oh jeez I didn’t even think of that, lemme try that out.
And yeah it’s meant to be on the true line, it’s basically stopping it from going past the max amount. So if energy ends up greater than max energy, it drops it back to max energy. It was on a tutorial I saw, and been using it since. I’m sure there’s a better way to do this though.
Edit
Sorry I haven’t worked with clamps much before (still pretty new to all this)
Am I putting the minimum and maximum Energy in (0 and then connecting the energy into max)?
It’s up to you, but I’d say the clamp needs to be 0 and 1, because that’s the valid range for the bar. We’re just trying to keep the bar in check there
Hmm a clamp going from 0 to 1 (and trying 0 to max energy) both don’t seem to work. The bar still reaches max at 100 instead of what the max energy is set to, while the energy variable continues to fill up to its max.
Edit
Let me just grab a video of what’s going on real quick
Here’s a visual in game, displaying what the Energy variable number is at and on the yellow bar bottom right that it does not start draining until Energy is below 100
This is what I’ve done exactly, but I’m trying to set the progress bar value above 100 (1:46 in the video) and it does not display properly, that’s the problem.
So I’m just wondering if I have to go about giving the players ‘more’ energy by doing it a different way.
Alright now I’m confused I set it up like this so it could be dynamic (I have multiple values Max Energy can be) but that just somehow locks Energy to 100 no matter what Max Energy is set to…
Yeah this is what I thought but for some reason when I set it up like this it’s locking Max Energy to 100, not the value I want (say, 300)
When the stats are randomized, say it sets Max Energy to 300 which should then cause this to divide by 300, when I check in game I can’t go over 100 anymore.
(Not going over 100%, going over 100 of the 300 value)