Home   Help Search Login Register  

Author Topic: a gun/shell/ heat problem  (Read 1156 times)

0 Members and 1 Guest are viewing this topic.

charunks

  • Guest
a gun/shell/ heat problem
« on: 01 Feb 2004, 18:38:59 »
Hey all, I am writing my very first config.cpp for a tank.
ingame, this tanks has 0 ammo. I ' ve been messing around for nearly half a day now and can' t find what' s wrong. Could someone tell me what I should change in the file so it works?

thnx

Quote
//Nejake zakladni definice / 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

//pravda nebo lez / true or lie
#define true 1
#define false 0

//viditelnost / visibility
#define private 0
#define protected 1
#define public 1

class CfgPatches
{
  class eltank_I
  {
     units[]={eltank_I};
     weapons[]={};
     worlds[]={};
     requiredVersion=v1.91;
   };

};

class CfgAmmo
{
   class Default {};
    class Shell : Default {};
    class Shell73 : Shell {}
    class Shell105 : Shell73 {};
    class Shell_LT :  Shell105
               {
      hit=300;
      indirectHit=110;
      cost=200;
      soundHit[]={"Explosions\expl2",100.000008,1};
   };
   
   
   class Heat : Shell {};
   class Heat73 : Heat {};
   class Heat105 : Heat73 {};
    class Heat_LT : Heat105
    {
      hit=450;
      indirectHit=150;
      cost=600;
   };
};


class CfgWeapons
{
   class Default {};
   class Shell105 :  Default {};
   class Shell_LT : Shell105
   {
   ammo="Shell_LT";
   count=30;
   initSpeed=900;
   reloadTime=10.000000;
   sound[]={"Weapons\gun105",10.000000,1};
   reloadSound[]={"Weapons\missload",0.000316,1};
   };

   class Heat_LT : Shell_LT
   {
      ammo="Heat_LT";
                                displayName="$STR_DN_HEAT";
      displayNameMagazine="$STR_MN_HEAT";
      shortNameMagazine="$STR_SN_HEAT";
      nameSound="heat";
      sound[]={"Weapons\gun105",10.000000,1};
      reloadSound[]={"Weapons\missload",0.000316,1};
   };

   class Gun105 : Default {};
   class Gun_LT : Gun105
   {
      sound[]={"Weapons\gun105",10.000000,1};
      reloadSound[]={"Weapons\missload",0.000316,1};
      magazines[]={"Heat_LT","Shell_LT"};
   };

};
class CfgVehicles
{

   class All {};
   class AllVehicles: All {};
   class LandVehicle: AllVehicles {};
   class Tank: LandVehicle {};
   class M60: Tank {};
   class eltank_I : M60
   {
   scope=public;
   vehicleClass="Armored";
   side=1;
   displayName="Earth Light Tank I";
   model="\eltank1\eltank1.p3d";
   speed=100;
   armor = 600 ;
   gunnerIsCommander=1;
   hasCommander = 0;
   hasDriver=1;
   hasGunner=0;
   driverIsGunner=1;
   gunnerisdriver=1;
   weapons[]={"Gun_LT","MachineGun12_7"};

   class ViewGunnerBase
      {
         initAngleX=5;
         minAngleX=-30;
         maxAngleX=30;
         initAngleY=0;
         minAngleY=-360;
         maxAngleY=360;
         initFov=0.700000;
         minFov=0.420000;
         maxFov=0.850000;
      };

    class IndicatorSpeed
      {
         selection="";
         axis="osa_rychlo";
         angle=0;
         min=0;
         max="60 / 3.6";
      };
   class IndicatorRPM
      {
         selection="";
         axis="osa_rpm";
         angle=0;
         min=0;
         max=1;
      };
   };
};
« Last Edit: 01 Feb 2004, 20:48:42 by charunks »

Rastavovich

  • Guest
Re:a gun/shell/ heat problem
« Reply #1 on: 02 Feb 2004, 23:51:28 »
Code: [Select]
class CfgWeapons
{
  class Default {};
  class Shell105 :  Default {};
  class Shell_LT : Shell105
....
  class Gun105 : Default {};
  class Gun_LT : Gun105


is wrong, use

Code: [Select]
class CfgWeapons
{
  class Default {};
  class Shell73 : Default {};
  class Shell105 :  Shell73 {};
  class Shell_LT : Shell105
.....
  class Gun73 : Default {};
  class Gun105 : Gun73 {};
  class Gun_LT : Gun105

instead