I am making a puzzle inside a widget that when a button is pressed it increases a progress bar but depletes a main main progress bar and another button does the flip of that.
I have tried to get it that when the main bar is empty the sub bar cant take anymore from it and when the main bar is full the sub bar cant put anymore into it.
The problem occurs when the main progress bar is empty and the increase button is pressed again then the sub bar takes an additional value from that main bar. When pressing that increase button again it then stops the process.
This does not happen when the value is being returned to the main bar via the decrease button. Here is my blueprint script: