Jump to content
Sign in to follow this  
zachgibson22

Sounds goes away on custom weapons

Recommended Posts

Title says it all. When I use my custom weapon, it doesn't make any sounds when I shoot which doesn't make much sense because it's just calling on the MX anyway.

Here's the part of the config dealing with the sound. Like I said, It's the same as the MX. Works when the're is a suppressor on there. And when I go to shoot a normal MX it works fine.

	class Single: Mode_SemiAuto {
		aidispersioncoefx = 1.4;
		aidispersioncoefy = 1.7;
		airateoffire = 2;
		airateoffiredistance = 500;
		artillerycharge = 1;
		artillerydispersion = 1;
		autofire = 0;
		begin1[] = {"A3\sounds_f\weapons\Trg20\trg_single_1.wav", 2.51189, 1, 1200}; //I dont have different sounds at the moment
		begin2[] = {"A3\sounds_f\weapons\Trg20\trg_single_2.wav", 2.51189, 1, 1200};
		begin3[] = {"A3\sounds_f\weapons\Trg20\trg_single_3.wav", 2.51189, 1, 1200};
		burst = 1;
		canshootinwater = 0;
		closure1[] = {"A3\sounds_f\weapons\closure\closure_rifle_2.wav", 3.16228, 1, 500}; 
		closure2[] = {"A3\sounds_f\weapons\closure\closure_rifle_3.wav", 3.16228, 1, 500};
		dispersion = 0.00093;
		displayname = "Semi";
		ffcount = 1;
		fffrequency = 11;
		ffmagnitude = 0.5;
		flash = "gunfire";
		flashsize = 0.1;
		maxrange = 500;
		maxrangeprobab = 0.2;
		midrange = 250;
		midrangeprobab = 0.7;
		minrange = 2;
		minrangeprobab = 0.3;
		multiplier = 1;
		recoil = "recoil_single_sdar";
		recoilprone = "recoil_single_prone_sdar";
		reloadtime = 0.065;
		requiredoptictype = -1;
		showtoplayer = 1;
		sound[] = {"", 10, 1};
		soundbegin[] = {"begin1", 0.333, "begin2", 0.333};
		soundbeginwater[] = {"sound", 1};
		soundburst = 0;
		soundclosure[] = {"closure1", 0.5, "closure2", 0.5};
		soundcontinuous = 0;
		soundend[] = {};
		soundloop[] = {};
		texturetype = "semi";
		useaction = 0;
		useactiontitle = "";
		weaponsoundeffect = "DefaultRifle";
	};
	class FullAuto: Mode_FullAuto {
		airateoffire = "1e-006";
		begin1[] = {"A3\sounds_f\weapons\Trg20\trg_single_1.wav", 2.51189, 1, 1200};
		begin2[] = {"A3\sounds_f\weapons\Trg20\trg_single_2.wav", 2.51189, 1, 1200};
		begin3[] = {"A3\sounds_f\weapons\Trg20\trg_single_3.wav", 2.51189, 1, 1200};
		canshootinwater = 0;
		closure1[] = {"A3\sounds_f\weapons\closure\closure_rifle_2.wav", 3.16228, 1, 500};
		closure2[] = {"A3\sounds_f\weapons\closure\closure_rifle_3.wav", 3.16228, 1, 500};
		dispersion = 0.00093;
		maxrange = 30;
		maxrangeprobab = 0.1;
		midrange = 15;
		midrangeprobab = 0.7;
		minrange = 0;
		minrangeprobab = 0.9;
		recoil = "recoil_auto_sdar";
		recoilprone = "recoil_auto_prone_sdar";
		reloadtime = 0.096;
		soundbegin[] = {"begin1", 0.5, "begin2", 0.5};
		soundclosure[] = {"closure1", 0.5, "closure2", 0.5};
		weaponsoundeffect = "DefaultRifle";
	};	
};
};

Share this post


Link to post
Share on other sites

Anybody!!!! This wont even work when I use custom sounds! What the heck is going on?!

Share this post


Link to post
Share on other sites

i would first remove all the bits that are not really required for your gun

(i.e. artillerycharge = 1; artillerydispersion = 1; ffcount = 1; etc), unless you specifically want to change something there.

These can cause problems if you dont know exactly what they are there for. E.g. i had "shotfromturret=1" for one of my turret weapons. Result was, that it didnt show any muzzle flashes or lights. Took some time before i figured that out :j:

Use the config from the sample weapon (or in fact the mode from the trg) and adjust that to your needs. Only add a parameter if you really want to change it.

	class Single: Mode_SemiAuto /// Pew
	{
		begin1[] = {"A3\sounds_f\weapons\MX\mx-st-full-1", db3, 1,1200};
		begin2[] = {"A3\sounds_f\weapons\MX\mx-st-full-2", db3, 1,1200};
		soundBegin[] = {begin1,0.5, begin2,0.5}; 

		closure1[]={"A3\sounds_f\weapons\closure\closure_rifle_6", db3, 1,10}; 
		closure2[]={"A3\sounds_f\weapons\closure\closure_rifle_7", db3, 1,10};
		soundClosure[]={closure1,0.5, closure2,0.5};
		weaponSoundEffect  = "DefaultRifle";
		reloadTime = 0.096;
		dispersion = 0.00087;

		recoil = "recoil_single_Test_rifle_01"; 
		recoilProne = "recoil_single_prone_Test_rifle_01";

		minRange = 2; minRangeProbab = 0.5;
		midRange = 200; midRangeProbab = 0.7; 
		maxRange = 400; maxRangeProbab = 0.3;
	};

Share this post


Link to post
Share on other sites

I'm not even sure if the engine can still play .wav files. Convert to .ogg to make sure.

Share this post


Link to post
Share on other sites

Hey brother BIS sounds are .wss files. They do not need a format ending. So ......

trg_single_1.wav needs to be .....

trg_single_1

And yes this engine works fine with wav files, however you have to include the format ending ".wav"

Edited by WarLord554

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  

×