HI, I’m trying to make a stamina mechanic although it works, the bar empties and refills when stop. for some reason if i empty the stamina and let it fill up anywhere between 1 and 99 i got and infinite stamina, causing the progress bar to flicker.
Try clamping the stamina calculation, it’s much easier ![]()
Clockwork is correct, but I personally don’t like the Retriggerable Delay here for what you’re trying to do. Because it’s so short, you can get away with it (for most players)… but if the player spams the button, they will NEVER deplete/recover stamina (because they will continue to interrupt the delay). You need a GATE, DO_ONCE, or Boolean.
I tried clamp that didn’t work for some reason
That could be something I’ll try that, thank you
Just a lil recommandation, may your problem in refill and using events, in your codes rn the loop doesnt waiting for your events callback so they may pass without bool changes. If not alreay this will be a problem later. You can change your events with macro (if the events all in the same bp) or use interface with callback boolean. For example for refillment event, add it a boolean out in interface event then event will wait its feedback. Should be solve your problem.
And sure add clamp[0-100] to your set floats.
hi i used a clamp and the issue im currently having is if i tried to spirnt or even use oxyegn between the vallue of 1 and 99 its bugs out the progress bars making in infinite
sorry but ive got it now, thanks



