Home   Help Search Login Register  

Author Topic: Malfunctioning machinegunner addon.  (Read 919 times)

0 Members and 1 Guest are viewing this topic.

Baphomet

  • Guest
Malfunctioning machinegunner addon.
« on: 29 Apr 2003, 05:00:24 »
I made a machinegunner addon with a custom machinegun I had made also, the point of them was to serve as an alternative replacement, functioning exactly the same way a normal machinegunner would. However... it doesn't. It won't shoot at certain aerial targets, including the cessna, and the BAS mh47 which I did most of my comparison tests. The default east machinegunner would respond actively to both threats... mine did not. What gives? I don't see what I'm doing wrong. Help anyone? Please?


// 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

#define WeaponNoSlot            0// dummy weapons
#define WeaponSlotPrimary      1// primary weapons
#define WeaponSlotSecondary   16// secondary weapons
#define WeaponSlotItem         256// items
#define WeaponSlotBinocular   4096// binocular
#define WeaponHardMounted      65536

class CfgModels
{
   class Default{};
   class Weapon: Default{};
   class ALTM60 : Weapon{};
};


class CfgRecoils
{
//ALTM60Single[]={0.0990,0.010000,0.069000,0.03000,0,0};
ALTM60Single[]={0.075,0.05000,0.0500,0.04000,0,0};
};


class CfgPatches
{
   class ALTM60
   {
      units[] = {AltM60soldier};
      weapons[] = {ALTM60};
      requiredVersion = 1.40;
   };

};

class CfgAmmo
{
   class default {};
   class BulletSingle : default{};
   class M60Bullet : BulletSingle
   {
      hit=11;
      indirectHit=1;
      indirectHitRange=0.100000;   
                tracerColor[]={2.1,2.5,2.4,0.500000};
      tracerColorR[]={0,0,0,0.00000};   
   };

};

class CfgWeapons

{
   class Default   {};
   class MGun: Default {};
   class Riffle: MGun {};
   class MachineGun7_6: MGun{};
   class MachineGun7_6Manual: MachineGun7_6{};
   class M60: MachineGun7_6Manual{};
   class ALTM60: M60
   {
      displayName = "M60";
      displayNameMagazine = "M60 Mag";
      shortNameMagazine = "M60";
                aiRateOfFire=0.900000;
      aiRateOfFireDistance=30
      scopeWeapon=2;
      scopeMagazine=0;
      weaponType = WeaponSlotPrimary + WeaponSlotSecondary;
      model="M60_MG_proxy";
      modelOptics="optika_M60_MG";
      picture="\dtaext\equip\w\w_pk.paa";              
      initspeed=850;
      magazineType="2 *          256";
      optics=true;
      opticsZoomMin=0.3500;
      opticsZoomMax=0.3500;
                count=100;
                magazines[]={"ALTM60Mag"};
      modes[]={"Single","FullAuto"};
                magazineReloadTime=5;
      
      class Single
      {
         ammo="M60Bullet";
         multiplier=1;
         burst=1;

         displayName="M60 Semi";

         dispersion=0.00200000;
         sound[]={"\AltM60\M60RAuto.wav",db-0,1};
         soundContinuous=0;
                        reloadTime=0.1500000;
         ffCount=1;
         recoil="mgunBurst3";
         autoFire=0;
         aiRateOfFire=5.000000;
         aiRateOfFireDistance=500;
         useAction=0;
         useActionTitle="";
                        opticsFlare=1
      };
      
      class FullAuto
      {
         ammo="M60Bullet";
         multiplier=1;
         burst=1;

         displayName="M60 Auto";

         dispersion=0.0020000;
         sound[]={"\AltM60\M60RAuto.wav",db-0,1};
         soundContinuous=0;
         reloadTime=0.109000;
         ffCount=32;
         recoil="altm60single";
         autoFire=1;
         aiRateOfFire=0.150000;
         aiRateOfFireDistance=500;
         useAction=0;
         useActionTitle="";
      };
};
                 class ALTM60Mag:  ALTM60
   {
       scopeWeapon=0;
       scopeMagazine=2;
       displayNameMagazine="M60 Mag";
       shortNameMagazine="M60";
       picture="\dtaext\equip\m\m_m60.paa";
        };

};
class CfgVehicles
{
   class All{};
   class AllVehicles:All{};
   class Land:AllVehicles{};
   class Man:Land{};
   class Soldier:Man{};
   class SoldierWB:Soldier{};
   class SoldierWMG:SoldierWB{};
   class AltM60: SoldierWMG
   {
   displayName="Soldier (M60)";
   weapons[]={"ALTM60","KasaThrow","Put"};
   magazines[]={ALTM60Mag,ALTM60Mag,ALTM60Mag,ALTM60Mag,ALTM60Mag};
   };

};




class CfgNonAIVehicles
{
   class ProxyWeapon {};
   class ProxyAltM60: ProxyWeapon {};
};

Baphomet

  • Guest
Re:Malfunctioning machinegunner addon.
« Reply #1 on: 29 Apr 2003, 07:56:47 »
Well I'm not quite sure what I did but I made some changes to the cpp and perhaps it had something to do with the ammo class. I should have documented them. Anyhow. My m60 works fine now... go figure *scratches head*   :o


EDIT:

Well, I changed the ammo class so that it inherited the characteristics of bullet7_6 which is a base ammo class for both the PK and M60 bullet...

I also added autofire=1; to the weapon class list. It must be the ammo class...

Or something...
Can anyone tell me which ai dispersion coefficient determines the vertical spread? X or Y?
« Last Edit: 29 Apr 2003, 08:08:11 by Baphomet »

DeLiltMon

  • Guest
Re:Malfunctioning machinegunner addon.
« Reply #2 on: 29 Apr 2003, 11:37:42 »
At a guess I'd say "Y"

Baphomet

  • Guest
Re:Malfunctioning machinegunner addon.
« Reply #3 on: 30 Apr 2003, 03:43:31 »
You were right. I looked 'er up in the commented config and there was a comment saying it was vertical spread. Thanks anywho.