ok, just uploaded the file for you to look at...
I made lots of little changes - I tried to put in comments to explain what I was doing.
Some of the changes were just to help debug - I made it so the mouse wheel zooms in and out, and pressing the Z key zooms way out to help see what is going on. I greatly increased the line of sight for the Ally troops, and reduced the health of the enemies so I didn't have to move units very far and they would need to find new targets quicker. I changed the unit selection box so that it can be dragged left or right. I also made it not start selecting until you moved the mouse a fix pixels because if you clicked right on a unit, the selection box would try to start selecting and often unselect the unit you clicked on.
I made the Ally troops a container, they each have their own select box, health bar, ammo bar and a target symbol (so I could see when they chose a target). Putting all that in a container automatically picks those elements when you select a unit. (I also made a stat window pop up when you select a unit for testing).
I added some more instance variables - TargetDelay, ShootDelay, AngleToTarget... to control how often they look for a target, and fire at it. This works better than using the Every X seconds, which can add confusion with picking. I think the main reason most units weren't firing was because it was looking for a specific angle to the enemy first and most of the Ally troops were at angles that were preventing them from firing.
I would consider putting all units in a family to simplify the code a lot further. They all need to do basically the same things - just with different parameters that can be set through the family instance variables.
Your world map is huge! I would look at making that smaller - I made the sprite smaller just to save space on the upload, but didn't make any other changes there.
https://www.rieperts.com/games/forum/TerritoryWar.capx