====== ArmA 2 Shotgun ======
[[https://www.pmctactical.org/forum/viewforum.php?f=50|ArmA 2 Forum]], [[:arma2|ArmA 2 Home]], [[arma2:config|ArmA 2 Config]], [[arma2:file_formats|ArmA 2 File Formats]], [[arma2:missions|ArmA 2 Missions]], [[arma2:modeling|ArmA 2 3D Modeling]], [[arma2:scripting|ArmA 2 Scripting]], [[arma2:terrain|ArmA 2 Terrain]], [[arma2:texturing|ArmA 2 Texturing]], [[arma2:tools|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:
* cfgWeapons fireSpreadAngle
* cfgAmmo simulation = shotSpread