About the selection, you don’t need have the capital selected, but you need check the selection states of the squadrons, we made an entire squadronService wich contains all various check and function about squadrons.
- Fighter take damage -> Bot detect it and go to recall the single squadron and deselect it from the selection
- Try to activate the 2nd bonus on the squadron recalled
- Everytime the bot have to shoot to any targhet the bot logic count how many squadrons are avaible, then count how many of them are in space with the status different then “Returning” if the for example the count was: 3 avaiable, 3 in space, 1 in returning, 1 selected, he go to select the squadron not actually selected and then go to shoot.
Actually the only “big” issue for us is the fill up the fighter into squadron if some fighter die, this because I can identify the max squadron quantity and the current quantity into launch tube, but we miss into memory structure the “ListTree” with buttons into fighter bay.
Actually Im studying if I can ovveride it in a different way because for fillup the fighter need a simple drag and drop from the FighterBay (cargo) to the FigtherBay (ListTree with buttons).
But Im still working on it