Hi, I am having difficulty with an in game menu. I have 7 functioning buttons , five are build unit buttons.
four of the build buttons are for machines, tanks and turrets , one is for foot soldiers. the four buttons have a progress bar that is under the buttons , the soldier has a progress circle that sit on its button.
the idea is that when I build a machine unit I can still 'train' a soldier , I don't see any problem with the buttons or script , the buttons act the way they should the machine buttons are disabled during machine builds the soldier button does the same.
I can build the two units at the same time if I start with a soldier its timer is set to 10 seconds the progress disk fills in properly , if I build a soldier then start a jeep , the disk fills in good and the bar fills in good , but if I build a jeep then a soldier , the bar disappears , the soldier disk fills and around 3/4 of the way the progress bar reappears but it is moving more quickly, the soldier is built and the jeep is built, they both seem to take the right amount of time.
it leaves me wondering if there is some type of timer conflict or something.
one progress bar is child of the root GridContainer, the other is child of the soldier button , the two timers are child of the two progress bars , they send two separate timeout signals to two separate functions. the progress is based on { Timer.get_time_left() } each bar has its own update function as bar_one and bar-two. the update functions are called based on { if not Timer.is_stopped: } checked for both timers. though I would admit my scripts tend to read like a plate of spaghetti I don't see that there is anything wrong in the script, certainly nothing that should cause the bar to disappear then reappear in mid build.
so I am wondering if that could possibly be a timer bug , or if there is another way to go about multiple progress bars with different timings?