I think there are several ways of doing this, if the flags aren't working for you. Here is one
EG
Name each tank in the group (ie, t1, t2, t3 and t4)
Now create a trigger.
in the "Conditions" box put :
!alive t1 && !alive t2 && !alive t3 && !alive t4
now in the "On activation" box put
v1=1
Now repeat this step for the next group, naming the tanks differently and changing the tank names in the trigger to match, and changing v1 to v2.
Do this for every unit you want to be killed before the game will end.
Now create another trigger (assuming you made 3 triggers in the previsou step, v1 v2 and v3)
In the "Conditions" box put:
v1==1 && v2==1 && v3==1
Now in the "type" box select
end #1
The 3 initial triggers set the values of V1, v2 and v3 to 1 one all the units listed are destroyed.
The 4 trigger looks to see when v1, v2 aned v3 are equal to 1, meaning all units have been destroyed, then end sthe game.
The thing to watch out for with this that if you hit the tank with enough damage to make the crew bail out.. it is not necessarily destroyed.