ArmA 2 Shotgun

ArmA 2 Forum, ArmA 2 Home, ArmA 2 Config, ArmA 2 File Formats, ArmA 2 Missions, ArmA 2 3D Modeling, ArmA 2 Scripting, ArmA 2 Terrain, ArmA 2 Texturing, ArmA 2 Tools

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: