How can I hide the HUD when a certain value is reached?

Hi everyone,

I created a stamina progress bar, that fills up with the rising stamina. Now want to hide it from the player when it’s at the maximum value of 100, and show it again when it is below 100.
I’ve tried every single way that comes to my mind, but I just can’t make it.

Does anyone know the solution to this Problem?

Set the stamina progress bar widget’s behavior visibility to “Hidden” when its at 100 or set it to “Visible” when its below 100. You can check against the stamina value either in your widget’s Tick function or a custom function that you might already have set up which updates the stamina.

How exactly does this work? I just started using the engine xD

How is “stamina” consumed? During what gameplay mechanics is it used? How is stamina recovered? This will determine the best way to go about solving your problem. Unless you have some odd mechanics where stamina is almost continuously changing during gameplay with no significant “downtime” where the value would be at 100% for example…i would avoid tick or binding events to update the bar as it will be doing an unnecessary amount of checks for no reason. I am a fan of the timeline because it can be used like a tick but also has other options to customize and more importantly it can be shut off when it’s not needed. So a little more explanation of your mechanics would be helpful in solving this.

I would recommend the SetStamina option over using a Tick function, which will unnecessarily update the visibility. Your SetStamina function can either pass in the value to set or a value to adjust the stamina by.