Jump to content
Sign in to follow this  
j0zh94

No muzzle flash only smoke

Recommended Posts

A weapon addon that i'm working on will not produce a muzzle flash. It produces a smoke cloud but not the flash itself. Any help would be appreciated.

The model has the proxy from the sample model, as well as the selection Zasleh (I have tried it with Muzzleflash too but it did not work).

Config (Still a WIP but the core is there)

class CfgPatches 
{
        class JO_RF_BR 
        {
               author[] = {"j0zh94"};
               requiredaddons[] = {"A3_Weapons_F"};
               requiredversion = 0,1;
               units[] = {};
               weapons[] = {"JO_RF_g3a3","JO_RF_FAL","JO_RF_L1a1"};
               magazines[] = {};
        };
};
/*external*/ class Mode_FullAuto;
/*external*/ class Mode_SemiAuto;

class CfgWeapons 
{

       class  Rifle;
       class Rifle_Base_F :   Rifle
       {
               class Single;
               class WeaponSlotsInfo;
               class FullAuto;
               class Gunparticles;
       };
       class JO_RF_g3a3_Base : Rifle_Base_F
       {
           author = "j0zh94";     
           handanim[] = {"OFP2_ManSkeleton", "\JO_RF_BR\data\anim\AK74.rtm"};
           model =  "\JO_RF_BR\G3.p3d";
           dexterity = 1.57;
           discretedistance[] = {200, 300, 400, 500, 600, 700, 800};
           discretedistanceinitindex = 1;
           descriptionshort = "Battle rifle<br />Caliber: 7.62x51mm";
           magazines[] = {"20Rnd_762x51_Mag", "20Rnd_762x51_Mag"};
           displayname = "g3a3";
           displaynameshort = "g3a3";
           modes[] = {"Single","Full","Medium","Close"};
           reloadaction = "GestureReloadEBR";  
           scope = 0;
           picture = "\JO_RF_BR\data\tex\UI\gear_G3a3_x_ca.paa";
		uipicture = "\A3\weapons_f\data\UI\icon_regular_CA.paa";
           recoil = "recoil_single_primary_8outof10";
           recoilprone = "recoil_single_primary_prone_8outof10";
           reloadmagazinesound[] = {"\JO_RF_BR\data\sound\g3a3r.wav", 0.630957, 1, 35};
           reloadtime = 0.1;
           class Single: Mode_SemiAuto 
           {
               sounds[] = {"StandardSound"};
               class BaseSoundModeType
               {
                   weaponSoundEffect = "DefaultRifle";
               };
               class StandardSound: BaseSoundModeType
               {
                   begin1[] = {"\JO_RF_BR\data\sound\g3a3-1.wav", 1.12202, 1, 1200};
                   begin2[] = {"\JO_RF_BR\data\sound\g3a3-2.wav", 1.12202, 1, 1200};
                   begin3[] = {"\JO_RF_BR\data\sound\g3a3-3.wav", 1.12202, 1, 1200};
                   soundbegin[] = {"begin1", 0.34, "begin2", 0.33, "begin3", 0.33};
               }; 
               airateoffire = 2;
               airateoffiredistance = 400;
               dispersion = 0.0017;
               maxrange = 500;
               maxrangeprobab = 0.1;
               midrange = 200;
               midrangeprobab = 0.5;
               minrange = 0;
               minrangeprobab = 0.7;
               recoil = "recoil_single_primary_10outof10";
               recoilprone = "recoil_single_primary_prone_10outof10";
               reloadtime = 0.09;
			selectionfireanim = "zasleh";
           };
           class Close: Mode_SemiAuto 
           {
               sounds[] = {"StandardSound"};
               class BaseSoundModeType
               {
                   weaponSoundEffect = "DefaultRifle";
               };
               class StandardSound: BaseSoundModeType
               {
                   begin1[] = {"\JO_RF_BR\data\sound\g3a3-1.wav", 1.12202, 1, 1200};
                   begin2[] = {"\JO_RF_BR\data\sound\g3a3-2.wav", 1.12202, 1, 1200};
                   begin3[] = {"\JO_RF_BR\data\sound\g3a3-3.wav", 1.12202, 1, 1200};
                   soundbegin[] = {"begin1", 0.34, "begin2", 0.33, "begin3", 0.33};
               }; 
               airateoffire = 2;
               Burst=1;
               airateoffiredistance = 400;
               dispersion = 0.0017;
               maxrange = 500;
               maxrangeprobab = 0.1;
               midrange = 200;
               midrangeprobab = 0.7;
               minrange = 0;
               minrangeprobab = 0.7;
               recoil = "recoil_single_primary_10outof10";
               recoilprone = "recoil_single_primary_prone_10outof10";
               reloadtime = 0.1;
               showtoplayer = 0;
			selectionfireanim = "zasleh";
           };
           class Medium: Mode_SemiAuto 
           {
               sounds[] = {"StandardSound"};
               class BaseSoundModeType
               {
                   weaponSoundEffect = "DefaultRifle";
               };
               class StandardSound: BaseSoundModeType
               {
                   begin1[] = {"\JO_RF_BR\data\sound\g3a3-1.wav", 1.12202, 1, 1200};
                   begin2[] = {"\JO_RF_BR\data\sound\g3a3-2.wav", 1.12202, 1, 1200};
                   begin3[] = {"\JO_RF_BR\data\sound\g3a3-3.wav", 1.12202, 1, 1200};
                   soundbegin[] = {"begin1", 0.34, "begin2", 0.33, "begin3", 0.33};
               }; 
               airateoffire = 2;
               Burst=1;
               airateoffiredistance = 600;
               dispersion = 0.0020;
               maxrange = 600;
               maxrangeprobab = 0.05;
               midrange = 450;
               midrangeprobab = 0.7;
               minrange = 0;
               minrangeprobab = 0.3;
               recoil = "recoil_single_primary_10outof10";
               recoilprone = "recoil_single_primary_prone_10outof10";
               reloadtime = 0.1;
               showtoplayer = 0;
			selectionfireanim = "zasleh";
           };
           class Full: Mode_FullAuto 
           {
               sounds[] = {"StandardSound"};
               class BaseSoundModeType
               {
                   weaponSoundEffect = "DefaultRifle";
               };
               class StandardSound: BaseSoundModeType
               {
                   begin1[] = {"\JO_RF_BR\data\sound\g3a3-1.wav", 1.12202, 1, 900};
                   begin2[] = {"\JO_RF_BR\data\sound\g3a3-2.wav", 1.12202, 1, 900};
                   begin3[] = {"\JO_RF_BR\data\sound\g3a3-3.wav", 1.12202, 1, 900};
                   soundbegin[] = {"begin1", 0.34, "begin2", 0.33, "begin3", 0.33};
               }; 
               airateoffire = 3;
               airateoffiredistance = 9;
               dispersion = 0.0020;
               maxrange = 9;
               maxrangeprobab = 0.05;
               midrange = 4;
               midrangeprobab = 0.7;
               minrange = 0;
               minrangeprobab = 0.3;
               recoil = "recoil_auto_primary_10outof10";
               recoilprone = "recoil_auto_primary_prone_10outof10";
               reloadtime = 0.1;
			selectionfireanim = "zasleh";
           };
		class WeaponSlotsInfo : WeaponSlotsInfo {
		mass = 120;

		class MuzzleSlot {
			compatibleitems[] = {};
		};

		class CowsSlot {
			compatibleitems[] = {};
		};

		class PointerSlot {
			compatibleitems[] = {};
		};
	};
           class Library 
           {
                   libtextdesc = "The Kalashnikov RPK-74 light machine gun has been developed during mid-seventies to complement the AK-74 assault rifle a sa standard squad automatic weapon of the Soviet (later Russian) army.It is based on the parent AK-74assault rifle in the same way as its 7,62mm predecessor RPK was based on AKM assault rifle.";
           };
           class GunParticles 
           {
              class FirstEffect 
              {
                   directionname = "Konec hlavne";
                   effectname = "RifleAssaultCloud";
                   positionname = "Usti hlavne";
               };
			class SecondEffect
		{
			positionName = "Nabojnicestart";
			directionName = "Nabojniceend";
			effectName = "CaselessAmmoCloud";
		};
           };
       };
       class JO_RF_g3a3 :JO_RF_g3a3_Base
       {
		author = "j0zh94"; 
           scope = 2;
           displayName = "G3A3";
       } ;        
	class JO_RF_FAL :JO_RF_g3a3_Base
       {
		author = "j0zh94"; 
           scope = 2;
           displayName = "FAL";
		picture = "\JO_RF_BR\data\tex\UI\gear_FAL_x_ca.paa";
		uipicture = "\A3\weapons_f\data\UI\icon_regular_CA.paa";
		model =  "\JO_RF_BR\Fal.p3d";
		reloadtime = 0.85;
		class Single: Mode_SemiAuto 
           {
			sounds[] = {"StandardSound"};
               class BaseSoundModeType
               {
                   weaponSoundEffect = "DefaultRifle";
               };
               class StandardSound: BaseSoundModeType
               {
                   begin1[] = {"\JO_RF_BR\data\sound\FAL.wav", 1.12202, 1, 900};
                   begin2[] = {"\JO_RF_BR\data\sound\FAL.wav", 1.12202, 1, 900};
                   begin3[] = {"\JO_RF_BR\data\sound\FAL.wav", 1.12202, 1, 900};
                   soundbegin[] = {"begin1", 0.34, "begin2", 0.33, "begin3", 0.33};
               }; 
               airateoffire = 3;
               airateoffiredistance = 600;
               dispersion = 0.0020;
               maxrange = 600;
               maxrangeprobab = 0.05;
               midrange = 450;
               midrangeprobab = 0.7;
               minrange = 0;
               minrangeprobab = 0.3;
               recoil = "recoil_single_primary_8outof10";
               recoilprone = "recoil_single_primary_prone_8outof10";
               reloadtime = 0.085;
           };
           class Close: Mode_SemiAuto 
           {
			sounds[] = {"StandardSound"};
               class BaseSoundModeType
               {
                   weaponSoundEffect = "DefaultRifle";
               };
               class StandardSound: BaseSoundModeType
               {
                   begin1[] = {"\JO_RF_BR\data\sound\FAL.wav", 1.12202, 1, 900};
                   begin2[] = {"\JO_RF_BR\data\sound\FAL.wav", 1.12202, 1, 900};
                   begin3[] = {"\JO_RF_BR\data\sound\FAL.wav", 1.12202, 1, 900};
                   soundbegin[] = {"begin1", 0.34, "begin2", 0.33, "begin3", 0.33};
               }; 
               airateoffire = 0,2;
               Burst=3;
               airateoffiredistance = 400;
               dispersion = 0.0017;
               maxrange = 500;
               maxrangeprobab = 0.1;
               midrange = 200;
               midrangeprobab = 0.7;
               minrange = 0;
               minrangeprobab = 0.7;
               recoil = "recoil_single_primary_8outof10";
               recoilprone = "recoil_single_primary_prone_8outof10";
               reloadtime = 0.085;
               showtoplayer = 0;
           };
           class Medium: Mode_SemiAuto 
           {
			sounds[] = {"StandardSound"};
               class BaseSoundModeType
               {
                   weaponSoundEffect = "DefaultRifle";
               };
               class StandardSound: BaseSoundModeType
               {
                   begin1[] = {"\JO_RF_BR\data\sound\FAL.wav", 1.12202, 1, 900};
                   begin2[] = {"\JO_RF_BR\data\sound\FAL.wav", 1.12202, 1, 900};
                   begin3[] = {"\JO_RF_BR\data\sound\FAL.wav", 1.12202, 1, 900};
                   soundbegin[] = {"begin1", 0.34, "begin2", 0.33, "begin3", 0.33};
               }; 
               airateoffire = 2;
               Burst=3;
               airateoffiredistance = 600;
               dispersion = 0.0020;
               maxrange = 600;
               maxrangeprobab = 0.05;
               midrange = 450;
               midrangeprobab = 0.7;
               minrange = 0;
               minrangeprobab = 0.3;
               recoil = "recoil_single_primary_8outof10";
               recoilprone = "recoil_single_primary_prone_8outof10";
               reloadtime = 0.085;
               showtoplayer = 0;
           };
           class Full: Mode_FullAuto 
           {
			sounds[] = {"StandardSound"};
               class BaseSoundModeType
               {
                   weaponSoundEffect = "DefaultRifle";
               };
               class StandardSound: BaseSoundModeType
               {
                   begin1[] = {"\JO_RF_BR\data\sound\FAL.wav", 1.12202, 1, 900};
                   begin2[] = {"\JO_RF_BR\data\sound\FAL.wav", 1.12202, 1, 900};
                   begin3[] = {"\JO_RF_BR\data\sound\FAL.wav", 1.12202, 1, 900};
                   soundbegin[] = {"begin1", 0.34, "begin2", 0.33, "begin3", 0.33};
               }; 
               airateoffire = 3;
               airateoffiredistance = 9;
               dispersion = 0.0020;
               maxrange = 9;
               maxrangeprobab = 0.05;
               midrange = 4;
               midrangeprobab = 0.7;
               minrange = 0;
               minrangeprobab = 0.3;
               recoil = "recoil_auto_primary_8outof10";
               recoilprone = "recoil_auto_primary_prone_8outof10";
               reloadtime = 0.085;
           };
       } ;	    
		class JO_RF_L1a1 :JO_RF_g3a3_Base
       {
		author = "j0zh94"; 
           scope = 2;
           displayName = "L1A1";
		picture = "\JO_RF_BR\data\tex\UI\gear_L1a1_x_ca.paa";
		uipicture = "\A3\weapons_f\data\UI\icon_regular_CA.paa";
		model =  "\JO_RF_BR\L1A1.p3d";
		modes[] = {"Single","Medium","Close"};
		class Single: Mode_SemiAuto 
           {
			sounds[] = {"StandardSound"};
               class BaseSoundModeType
               {
                   weaponSoundEffect = "DefaultRifle";
               };
               class StandardSound: BaseSoundModeType
               {
                   begin1[] = {"\JO_RF_BR\data\sound\FAL.wav", 1.12202, 1, 900};
                   begin2[] = {"\JO_RF_BR\data\sound\FAL.wav", 1.12202, 1, 900};
                   begin3[] = {"\JO_RF_BR\data\sound\FAL.wav", 1.12202, 1, 900};
                   soundbegin[] = {"begin1", 0.34, "begin2", 0.33, "begin3", 0.33};
               }; 
               airateoffire = 3;
               airateoffiredistance = 600;
               dispersion = 0.0020;
               maxrange = 600;
               maxrangeprobab = 0.05;
               midrange = 450;
               midrangeprobab = 0.7;
               minrange = 0;
               minrangeprobab = 0.3;
               recoil = "recoil_single_primary_8outof10";
               recoilprone = "recoil_single_primary_prone_8outof10";
               reloadtime = 0.085;
           };
           class Close: Mode_SemiAuto 
           {
			sounds[] = {"StandardSound"};
               class BaseSoundModeType
               {
                   weaponSoundEffect = "DefaultRifle";
               };
               class StandardSound: BaseSoundModeType
               {
                   begin1[] = {"\JO_RF_BR\data\sound\FAL.wav", 1.12202, 1, 900};
                   begin2[] = {"\JO_RF_BR\data\sound\FAL.wav", 1.12202, 1, 900};
                   begin3[] = {"\JO_RF_BR\data\sound\FAL.wav", 1.12202, 1, 900};
                   soundbegin[] = {"begin1", 0.34, "begin2", 0.33, "begin3", 0.33};
               }; 
               airateoffire = 0,2;
               Burst=1;
               airateoffiredistance = 400;
               dispersion = 0.0017;
               maxrange = 500;
               maxrangeprobab = 0.1;
               midrange = 200;
               midrangeprobab = 0.7;
               minrange = 0;
               minrangeprobab = 0.7;
               recoil = "recoil_single_primary_8outof10";
               recoilprone = "recoil_single_primary_prone_8outof10";
               reloadtime = 0.085;
               showtoplayer = 0;
           };
           class Medium: Mode_SemiAuto 
           {
			sounds[] = {"StandardSound"};
               class BaseSoundModeType
               {
                   weaponSoundEffect = "DefaultRifle";
               };
               class StandardSound: BaseSoundModeType
               {
                   begin1[] = {"\JO_RF_BR\data\sound\FAL.wav", 1.12202, 1, 900};
                   begin2[] = {"\JO_RF_BR\data\sound\FAL.wav", 1.12202, 1, 900};
                   begin3[] = {"\JO_RF_BR\data\sound\FAL.wav", 1.12202, 1, 900};
                   soundbegin[] = {"begin1", 0.34, "begin2", 0.33, "begin3", 0.33};
               }; 
               airateoffire = 2;
               Burst=1;
               airateoffiredistance = 600;
               dispersion = 0.0020;
               maxrange = 600;
               maxrangeprobab = 0.05;
               midrange = 450;
               midrangeprobab = 0.7;
               minrange = 0;
               minrangeprobab = 0.3;
               recoil = "recoil_single_primary_8outof10";
               recoilprone = "recoil_single_primary_prone_8outof10";
               reloadtime = 0.085;
               showtoplayer = 0;
           };
       } ;	    
};

class CfgMagazines 
{
};

Mode.cfg

class CfgSkeletons
{
class Default
{
	isDiscrete=1;
	skeletonInherit="";
	skeletonBones[]={};
};
class BR_Skel: Default
{
	skeletonBones[]=
	{
		"magazine","",
		"bolt", "",
		"safety", "",
		"iron_sight", "",
		"front_sight", "",
		"Trigger", "",
		"ris", "",
		"muzzle", "",
		"zasleh", ""		
	};
};
};
class CfgModels
{
class Default
{
	sectionsInherit="";
	sections[]={};
	skeletonName="";
};
class G3: Default
{
	sections[]=
	{
		"zasleh"
	};
	skeletonName="BR_Skel";
	class Animations
	{	
		class trigger_move

		{
			type="rotation";
			source="reload";
			selection="trigger";
			memory=1;
			sourceAddress="clamp";
			axis = "trigger_Axis";
			minValue=0.0;
			maxValue=0.3;
			minPhase=0.0;
			maxPhase=0.3;
			angle0=0;
			angle1=-0.212389;
		};

		class muzzle_hide
		{
			type="hide";
			source="hasSuppressor";
			selection="muzzle";
			minValue = 0.0;
			maxValue = 1.0;
			hideValue = 1;
			animPeriod = 0.0;
			initPhase = 0.0;
		};

		class bolt_move

		{
			type="translation";
			source="reload";
			selection="bolt";
			memory=1;
			sourceAddress="clamp";
			axis = "bolt_Axis";
			minValue=0.0;
			maxValue=1;
			minPhase=0.0;
			maxPhase=1;
			offset0=0;
			offset1=0.6;
		};

		class bolt_empty
		{
			type="translation";
			source="isEmptyNoReload";
			selection="bolt";
			axis="bolt_axis";
			sourceAddress = clamp;
			minValue = 0.0;
			maxValue = 1.0;
			offset0 = 0.0;
			offset1 = 0.6;
			animPeriod = 0.0;
			initPhase = 0.0;
			memory = true;
		};

		class magazine_reload_hide
		{
			type="hide";
			source="reloadMagazine";
			selection="magazine";
			sourceAddress = clamp;
			minValue = 0.0;
			maxValue = 1.0;
			hideValue = 0.24;
			unHideValue = 0.602;
			animPeriod = 0.0;
			initPhase = 0.0;
		};

		class magazine_reload_move_1
		{
			type="translation";
			source="reloadMagazine";
			selection="magazine";
			axis="magazine_axis";
			sourceAddress = clamp;
			minValue = 0.18;
			maxValue = 0.23;
			offset0 = 0.0;
			offset1 = 1.2;
			animPeriod = 0.0;
			initPhase = 0.0;
			memory = true;
		};

		class magazine_reload_move_2
		{
			type="translation";
			source="reloadMagazine";
			selection="magazine";
			axis="magazine_axis";
			sourceAddress = clamp;
			minValue = 0.615;
			maxValue = 0.65;
			offset0 = 0.0;
			offset1 = -1.2;
			animPeriod = 0.0;
			initPhase = 0.0;
			memory = true;
		};

		class no_magazine
		{
			type="hide";
			source="hasMagazine";
			selection="magazine";
			sourceAddress = clamp;
			minValue = 0.0;
			maxValue = 1.0;
			hideValue = 0.5;
			unHideValue = -1.0;
			animPeriod = 0.0;
			initPhase = 0.0;
		};

		class safety_mode_rot
		{
			type="rotationz";
			source="weaponMode";
			selection="safety";
			axis="safety_axis";
			sourceAddress = clamp;
			minValue = 0.0;
			maxValue = 0.25;
			angle0 = 0;
			angle1 = 0.50;
			animPeriod = 0.0;
			initPhase = 0.0;
			memory = true;
		};

		class ironsight_hide
		{
			type="hide";
			source="hasOptics";
			selection="iron_sight";
			minValue = 0.0;
			maxValue = 1.0;
			hideValue = 1;
			animPeriod = 0.0;
			initPhase = 0.0;
		};

		class ris_unhide
		{
			type="hide";
			source="hasOptics";
			selection="ris";
			minValue = 0.0;
			maxValue = 1.0;
			hideValue = 0;
			unhideValue = 1;
			animPeriod = 0.0;
			initPhase = 0.0;
		};

		class MuzzleFlashROT
			{
				type="rotationX";
				source="ammoRandom";            //use ammo count as phase for animation
				sourceAddress="loop";     //loop when phase out of bounds
				selection="zasleh";       //selection we want to rotate
				axis="zasleh_axis";                  //no own axis - center of rotation is computed from selection
				centerFirstVertex=true;   //use first vertex of selection as center of rotation
				minValue=0;
				maxValue=4;               //rotation angle will be 360/4 = 90 degrees
				angle0="rad 0";
				angle1="rad 360";
			};

	};
};
};

I have tried a muzzleflash, new Model.cfg, making sure the proxies are correct but it still hasn't resolved it. Any tips?

Share this post


Link to post
Share on other sites

I can't help but notice that your model.cfg references G3 (as the model name) but the weapon config is using 'L1A1.p3d'. That probably isn't the cause of your issue, but it wont help.

Will also be worth checking the path of the proxy. I realise you say its the same as the one used on the sample models, but which sample models? - could be the ArmA2 ones which wont work in ArmA3 without you editing their path.

Share this post


Link to post
Share on other sites

I have separate model.cfg for each weapon. The one I used was for the G3 but the other two are identical.

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  

×