User Tools

Site Tools


arma2:config:shotgun

Shotgun

Config for shotgun weapon. ArmA 2 engine v?.? finally introduced real shotgun simulation (shells, pellets and slug).

Here are the most essential “shotgun” parts for the config (please note, this is NOT full weapon config).

weapons_pmc\aa_12\config.cpp

class Rifle;
class AA12_PMC: Rifle
 
magazines[] =
{
	"20Rnd_B_AA12_Pellets",
	"20Rnd_B_AA12_74Slug",
	"20Rnd_B_AA12_HE"
};
 
fireSpreadAngle = 0.7848246;
 
modes[] = {"Single","FullAuto"};
 
class Single: Mode_SemiAuto
{
	dispersion = 0.002;
	reloadTime = 0.2;
};
 
class FullAuto: Mode_FullAuto
{
	dispersion = 0.003;
	reloadTime = 0.2;
};

weapons_pmc\config.cpp

class CfgMagazines
 
class 20Rnd_B_AA12_Pellets: CA_Magazine
{
	ammo = "B_12Gauge_Pellets";
	count = 20;
};
 
class 20Rnd_B_AA12_74Slug: CA_Magazine
{
	ammo = "B_12Gauge_74Slug";
	count = 20;
};
 
class CfgAmmo
 
class BulletBase;
class B_12Gauge_Pellets: BulletBase
{
	simulation = "shotSpread";
	hit = 6;
	indirectHit = 0;
	indirectHitRange = 0;
	cartridge = "FxCartridge_slug";
	cost = 2;
	typicalSpeed = 400;
	visibleFire = 18;
	audibleFire = 18;
	airFriction = -0.005;
	caliber = 0.5;
};

Conclusion

Important parts to make shotgun is to have:

  • cfgWeapons fireSpreadAngle
  • cfgAmmo simulation = shotSpread
arma2/config/shotgun.txt · Last modified: 2011-07-01 08:14 (external edit)