Jump to content
Sign in to follow this  
callaway

OA : Weapon Config for SCAR

Recommended Posts

I've done some weapon sound editing in the past, but I'm having tons of trouble with OA. For some reason I cannot seem to get the SCAR variants to config with new sounds. Here is a sample of my config, am I missing something or are my class names wrong? Thanks for any help :)

// test_SCAR

// test_SCAR.pbo

class CfgPatches
{
class test_SCAR
{
	units[] = {};
	weapons[] = {};
	requiredVersion = 1.01;
	requiredAddons[] = {"CAWeapons"};
};
};
class SCAR_Base;
class Single;
class FullAuto;
class CfgWeapons
{
class SCAR_L_BASE: SCAR_Base
{
		drySound[] ={"\test_SCAR\SCAR_Dry",0.000316228,1,10};
		reloadMagazineSound[] ={"\test_SCAR\SCAR_Reload",0.0562341,1,10};
	class Single: Single
	{
		begin1[] ={"\test_SCAR\SCAR_single_shot_v2",1.07828,1,800};
		begin2[] ={"\est_SCAR\SCAR_single_shot_v3",1.07828,1,800};
		begin3[] ={"\test_SCAR\SCAR_single_shot_v4",1.07828,1,800};
		soundBegin[] ={"begin1",0.25, "begin2",0.25, "begin3",0.25};
	};
	class FullAuto: FullAuto
	{
		begin1[] ={"\test_SCAR\SCAR_single_shot_v2",1.07828,1,800};
		begin2[] ={"\test_SCAR\SCAR_single_shot_v3",1.07828,1,800};
		begin3[] ={"\test_SCAR\SCAR_single_shot_v4",1.07828,1,800};
		soundBegin[] ={"begin1",0.25, "begin2",0.25, "begin3",0.25};
	};
};
};

Share this post


Link to post
Share on other sites

requiredAddons[] = {"CAWeapons","CAWeapons_E","CAWeapons_E_scar"};

class CfgWeapons
{
/*exern*/ class Rifle;
/*exern*/ class M16_base;
/*exern*/ class Single;
/*exern*/ class Burst;
/*exern*/ class FullAuto;
class SCAR_Base: M16_base;

class SCAR_L_BASE: SCAR_Base
{
.............
       };

Edited by nikita320106

Share this post


Link to post
Share on other sites

Awesome, thanks for the help, I'll try this out today.

Share this post


Link to post
Share on other sites

It would be more correct to do like this:

(Notice fire modes are first declared inside the parent class, plus you are using wrong fire mode classes (should be SCAR_L_Single, SCAR_L_FullAuto instead of Single, FullAuto)

class CfgWeapons
{
class M16_base;
class SCAR_Base: M16_base
{
  class SCAR_L_Single;
  class SCAR_L_FullAuto;
};
class SCAR_L_BASE: SCAR_Base
{
  	             drySound[] ={"\test_SCAR\SCAR_Dry",0.000316228,1,10};
	reloadMagazineSound[] ={"\test_SCAR\SCAR_Reload",0.0562341,1,10};
	class SCAR_L_Single: SCAR_L_Single
	{
		begin1[] ={"\test_SCAR\SCAR_single_shot_v2",1.07828,1,800};
		begin2[] ={"\est_SCAR\SCAR_single_shot_v3",1.07828,1,800};
		begin3[] ={"\test_SCAR\SCAR_single_shot_v4",1.07828,1,800};
		soundBegin[] ={"begin1",0.25, "begin2",0.25, "begin3",0.25};
	};
	class SCAR_L_FullAuto: SCAR_L_FullAuto
	{
		begin1[] ={"\test_SCAR\SCAR_single_shot_v2",1.07828,1,800};
		begin2[] ={"\test_SCAR\SCAR_single_shot_v3",1.07828,1,800};
		begin3[] ={"\test_SCAR\SCAR_single_shot_v4",1.07828,1,800};
		soundBegin[] ={"begin1",0.25, "begin2",0.25, "begin3",0.25};
	};
};
};

Edited by Q1184

Share this post


Link to post
Share on other sites

Make sure the weapons that extend SCAR-L base do not have their own unique sounds in weapons_e.

Also, it might be safer to have M16 extend Rifle which extends Riflebase or something. Better safe than sorry.

Oh, AND:

requiredAddons[] = {"CAWeapons"};

Read CAWeapons_E or whatever the new one is.

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  

×