User Tools

Site Tools


arma2:config:shotgun

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:

  • cfgWeapons fireSpreadAngle
  • cfgAmmo simulation = shotSpread
arma2/config/shotgun.txt · Last modified: 2024/08/01 17:10 by snakeman

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

All PMC web site download services are temporarily suspended until web site yearly fees have been recovered, want to download addons/mods? Then Support PMC.

If you are grateful for all the work PMC has done in the past 25 years, use Support PMC page.