I have made a variety of the overlord which has the standard main gun as primary weapon but a HE missile as secondary weapon. It is supposed to use its gun against vehicles and buildings, but the missile against aircraft and infantry. If you remember the C&C Mammoth Tank, this one is very similar. Here's the code:
Code:
WeaponSet
Conditions = None
Weapon = PRIMARY OverlordTankGun
PreferredAgainst = PRIMARY VEHICLE STRUCTURE
AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
Weapon = SECONDARY MammothTuskMissile
PreferredAgainst = SECONDARY INFANTRY AIRCRAFT
AutoChooseSources = SECONDARY FROM_PLAYER FROM_SCRIPT FROM_AI
End
The problem is, with the current setup, the tank will use both the guns and the missiles simultaniously, no matter what the target is (except aircraft, as the gun is not capable of targeting them). So how do I get it to use missiles against infantry and aircraft and guns against vehicles and buildings?