View Single Post
Old 09-11-2003, 01:15 PM   #1 (permalink)
CodeCat
Senior Member
 
Join Date: May 2003
Location: Eindhoven, Netherlands
Posts: 2,278
Send a message via ICQ to CodeCat Send a message via MSN to CodeCat
Default Auto-choosing weapons problem (SOLVED)

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?
CodeCat is offline   Reply With Quote