Home   Help Search Login Register  

Author Topic: How do I make this .cpp work?  (Read 1096 times)

0 Members and 1 Guest are viewing this topic.

Bishop

  • Guest
How do I make this .cpp work?
« on: 24 Mar 2003, 16:52:11 »
// some basic defines
#define TEast 0
#define TWest 1
#define TGuerrila 2
#define TCivilian 3
#define TSideUnknown 4
#define TEnemy 5
#define TFriendly 6
#define TLogic 7

#define true 1
#define false 0

// type scope
#define private 0
#define protected 1
#define public 2

class CfgPatches
{
   class A10real
   {
      units[] = {A10real};
      weapons[] = {};
      requiredVersion = 1.75;
   };
};

class CfgAmmo

{
   class Default {};
   class AT3: Default {};
   class CarlGustav: AT3 {};
    class AA : CarlGustav {};
   class rockfast : AA
   {


      minRange=100;         
              minRangeProbab=0.8;      
           midRange=500;         
           midRangeProbab=1.0;      
           maxRange=2000;         
           maxRangeProbab=1.0;      
      airLock=0;
      groundlock=1;
      irLock=1;
      initTime=1.100000;
      simulation="shotMissile";
      simulationStep=0.050000;
      thrustTime=4.500000;
      thrust=350;
      maxspeed=1400;
      hit=150;indirectHit=10;indirectHitRange=3;      
      model = "\SPC_MIG\MIG29_AA8a_Aphid.p3d";
      proxyShape="\SPC_MIG\MIG29_AA8a_Aphid.p3d";
      manualControl=false;
      maxControlRange=1000;
      maneuvrability=90.0;


   };
};

class CfgWeapons

{
   class Default {};
   class LAWLauncher: Default {};
   class CarlGustavLauncher : LAWLauncher {};
   class AT3Launcher: CarlGustavLauncher {};
   class HellfireLauncher: AT3Launcher {};
   class MaverickLauncher: HellfireLauncher {};
   class a10rockfast: MaverickLauncher
   {
      
      ammo=rockfast ;
      displayName="AG Missiles";
      displayNameMagazine="AG Missiles";
      shortNameMagazine="rockfast ";
      count=40;
      initspeed=15;   
      model = "\SPC_MIG\MIG29_AA8a_Aphid.p3d";   
      canLock=2;      
      sound[]={Weapons\rocketflying,db-10,1};
      aiRateOfFire=12.000000;
      aiRateOfFireDistance=2500;
      reloadTime=0.15;
   };

   

};


class CfgVehicles
{
   class All {};
   class AllVehicles: All {};
   class Air: AllVehicles {};
   class Plane: Air {};
   class A10: Plane {};
   class A10real:  A10
   {
      
      displayName=A10 Real;
      armor=50;

      weapons[]={a10rockfast, RAAMG};
      magazines[]={rockfast , RAAMG};
      
   };
};

class CfgNonAIVehicles
{
   class ProxyWeapon {};
   class ProxyAT6 : ProxyWeapon {model = \Su25\Ch_29T; simulation = "maverickweapon";}
};



It gives some kind of error when I start up saying no entry in config.bin weapon....blah blah blah... or so

Skaircro

  • Guest
Re:How do I make this .cpp work?
« Reply #1 on: 25 Mar 2003, 14:27:04 »
You have RAAMG in your vehicles weapons and magazines, but you haven't defined what is is anywhere.

Also your magazines should be a10rockfast, not rockfast.
Think of weapons[]={}; as telling the game what weapons you want on the vehicle.
And magazines[]={}; as telling the game what weapons you want loaded with ammo.
The weapon defines what ammo type is to be used.
 ;)

Bishop

  • Guest
Re:How do I make this .cpp work?
« Reply #2 on: 25 Mar 2003, 19:22:31 »
Thanks, that did it.

RAAMG was already in another file...