Jump to content
Sign in to follow this  
doubleblind

[Help] Custom Magazine Won't Fire

Recommended Posts

Hello all,

 

I'm trying to make a custom ammunition type (armor-piercing) and allow vanilla and Apex weapons to use it. I can get the magazine and a weapon modified to use the magazine into the game and the weapon, but when loaded with my armor-piercing mag, the weapon won't fire. Reloading with a vanilla mag allows the weapon to fire again, so I think the problem is in the magazine or ammunition config. This is my first crack at this so I have no idea what's going wrong; I googled around a bit as well and came up empty. Can anybody see what I'm doing wrong or suggest ways to fix it? Here is my config:

 

class CfgPatches
{
	class PO_Weapons
	{
		addonRootClass = "PO";
		
		requiredVersion = 0.1;
		requiredAddons[] = {"PO"};
		units[] = {};
		weapons[] = {};
	};
};

class CfgAmmo
{
	class BulletBase;
	///////////////////////////////////////////////////////////////////////////////////////////////////////////
	class CH_545x39_AP : BulletBase
	{
		hit = 3.5;
	};
};

class CfgMagazines
{
	class 30Rnd_545x39_Mag_F;
	///////////////////////////////////////////////////////////////////////////////////////////////////////////
	class CH_30Rnd_545x39_AP_F : 30Rnd_545x39_Mag_F
	{
		ammo = "CH_B_545x39_AP";
		displayName = "5.45 mm 30Rnd Armor-Piercing Mag";
		displayNameShort = "AP";
		lastRoundsTracer = 0;
	};
};

class CfgWeapons
{
	class arifle_AKS_F;
	///////////////////////////////////////////////////////////////////////////////////////////////////////////
	class CH_arifle_AKS_F : arifle_AKS_F
	{
		magazines[] = {"30Rnd_545x39_Mag_F","30Rnd_545x39_Mag_Green_F","30Rnd_545x39_Mag_Tracer_F","30Rnd_545x39_Mag_Tracer_Green_F","CH_30Rnd_545x39_AP_F"};
	};
};

Thanks!

Share this post


Link to post
Share on other sites

The ammo in your magazine doesn't match up with the one in cfgAmmo.

Share this post


Link to post
Share on other sites
9 minutes ago, Nightmare515 said:

The ammo in your magazine doesn't match up with the one in cfgAmmo.

Well then, I'm an idiot. Thanks for pointing that out, it works now.

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×