Home   Help Search Login Register  

Author Topic: Config  (Read 1296 times)

0 Members and 1 Guest are viewing this topic.

marcus3

  • Guest
Config
« on: 08 Dec 2005, 19:05:47 »
hi all! i am makeing a gun, the m6 scout, i need some help
the gun it supposed to shoot both shotgun shells, and a .22 magun bullit, now i have not idea how to config it to do both, i  looked at the masterkey addon config and it did not look to hard, but i dont know that much, so waht i am asking is
that someone will write a config for the gun to shoot both shells/bullits
thanks alot
P.M me :)

marcus3

  • Guest
Re:Config
« Reply #1 on: 13 Dec 2005, 18:36:35 »
ok, i no longer need someone to do this, someone is not doing it for me, i jst decied to drop the project

Offline remcen

  • Contributing Member
  • **
  • a.k.a. hottentotten_mike
    • IM:UC
Re:Config
« Reply #2 on: 13 Dec 2005, 19:03:22 »
ah, not so quick, it's really easy... look into the kozlice config. the kozlice too shoots two different kinds of ammo.

you only need to tweak the ballistics of the  ball and shell ammo classes, add your weapon name, rename some classes etc. if you're familiar to config writing it shouldn't be a big thing. if not, post your probs here :)

the config of the kozlice:
Code: [Select]
// 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 CfgPatches
{
   class Kozlice
   {
      units[] = {};
      weapons[] = {Kozlice};
      requiredVersion = 1.01;
   };
};

class CfgAmmo
{
   
   class default {};

   class BulletSingle : Default
   {   };
   
   class KozliceBall : BulletSingle {};
   
   class BulletBurst: BulletSingle {};
   
   class KozliceShell : BulletBurst
   {
      hit=9;indirectHit=6;indirectHitRange=0.1;
   };
   
};

class CfgWeapons
{
   class Default   {};
   class MGun: Default {};
   class Riffle: MGun {};

   class KozliceBall: Riffle
   {
      scopeWeapon = private;
      scopeMagazine = public;

      modelOptics="\kozl\optika_kozlice";
      picture="\kozl\m_kozlice2.paa";
      optics = true;
      opticsZoomMin=0.35; //was 0.21
      opticsZoomMax=0.35;

      displayName = $STR_DN_KOZLICE_BALL;
      displayNameMagazine = $STR_MN_KOZLICE_BALL;
      shortNameMagazine = $STR_SN_KOZLICE_BALL;
      drySound[]={"weapons\M16dry",db-40,1};   // empty magazine

     
      ammo = KozliceBall;
      count = 1;
      multiplier=1;
      burst=1;
      dispersion=0.0002;
      sound[]={\kozl\kozl_single,db0,1};
      reloadMagazineSound[]={\kozl\kozl_load,db-70,1};


      soundContinuous=false;
      reloadTime=0.05;
      ffCount=1;
      recoil=sniperSingle;
      recoilFixed=riffleSingleFixed;
      autoFire = false;
      aiRateOfFire=5.0; // delay between shots at given distance
      aiRateOfFireDistance=500; // at shorter distance delay goes lineary to zero

      useAction = false;
      useActionTitle = "";
   };

   class KozliceShell: Riffle
   {
      scopeWeapon = private;
      scopeMagazine = public;

      modelOptics="\kozl\optika_kozlice";
      picture="\kozl\m_kozlice1.paa";
      optics = true;
      opticsZoomMin=0.35; //was 0.21
      opticsZoomMax=0.35;

      displayName = $STR_DN_KOZLICE_SHELL;
      displayNameMagazine = $STR_MN_KOZLICE_SHELL;
      shortNameMagazine = $STR_SN_KOZLICE_SHELL;
      drySound[]={"weapons\M16dry",db-40,1};   // empty magazine
     
      muzzles[] = {};

      ammo = KozliceShell;
      count = 7;
      multiplier=1;
      division=7; //added for fix in the US version of wrong ammo count
      burst=7;
      dispersion=0.0001;
      sound[]={\kozl\kozl_single,db0,1};
      reloadMagazineSound[]={\kozl\kozl_load,db-70,1};
     
      soundContinuous=false;
      reloadTime=0.001;
      magazineReloadTime=3;  
      ffCount=1;
      recoil=sniperSingle;
      recoilFixed=riffleSingleFixed;
      autoFire = false;
      aiRateOfFire=5.0; // delay between shots at given distance
      aiRateOfFireDistance=500; // at shorter distance delay goes lineary to zero

      useAction = false;
      useActionTitle = "";
   };

   class Kozlice
   {
      scopeWeapon = public;
      scopeMagazine = private;

      weaponType = WeaponSlotPrimary;

      displayName = $STR_DN_KOZLICE;
      model="\kozl\kozlice";
      picture="\kozl\w_kozlice.paa";

      muzzles[] = {KozliceBallMuzzle, KozliceShellMuzzle};
      class KozliceBallMuzzle : KozliceBall
      {
         magazines[] = {KozliceBall};
      };
      class KozliceShellMuzzle : KozliceShell
      {
         magazines[] = {KozliceShell};
      }
   };
};

class CfgNonAIVehicles
{
   class ProxyWeapon {};
   class ProxyKozlice: ProxyWeapon {};
};

use this as a template, or as inspiration- but do not just simply copy&paste this config ;)

//edit: wait... i think you need no two muzzles here, cos in fact you shoot it through the same, right? the m6 doesn't have two barrels, does it??? well, if so, you code the m6 as a rifle, give it two possible magazines (magazines[]={ballmag, shellmag};) and then add the magazines as subclasses of the m6.
« Last Edit: 13 Dec 2005, 19:21:10 by remcen »
we're looking for members: IM:UC MOD

marcus3

  • Guest
Re:Config
« Reply #3 on: 17 Dec 2005, 06:15:28 »
hey man, thanks for this, but as i said i have drop'd the project, thanks anywas mate ;)