Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
nullsystems

Adding new smoke colors

Recommended Posts

Hi all,

Ive been attempting to add a new smoke color to a mod im working on..

It just isnt working.

What I've done here is take the SmokeShellRed in the configs, bunched it up and created my own, simply by changing "red" to "cs" for reference.

Yet, this only creates the magazine in my players gear, without being able to select it or use it.

Any help would be great. Thank you !

class CfgPatches
{
class CAWeapons
{
 units[] = {};
 magazines[]= {"smokeshellcs"};
    weapons[]={"smokeshellcs"};
 requiredVersion =0.1;
      requiredAddons[]={};
};       
};

class CfgAmmo {
class Default;
class Grenade;
class GrenadeHand : Grenade {};
class SmokeShell : GrenadeHand {};
   class SmokeShellcs : SmokeShell {
	model = "\ca\Weapons\m18_red";
	smokeColor[] = {0.0438, 0.2383, 0.1953, 1};
            scope = 2;
};
};

class CfgMagazines {	
class Default;	// External class reference
class CA_Magazine : Default {};
class HandGrenade : CA_Magazine {};
class HandGrenadeTimed : HandGrenade {};
class SmokeShell : HandGrenade {};
   class SmokeShellcs : SmokeShell {
	displayName = $STR_MN_SMOKE_RED;
	picture = "\CA\weapons\data\equip\m_m18red_ca.paa";
	ammo = "SmokeShellcs";
	descriptionShort = "$STR_DSS_SmokeShellRed";
       scope = 2;
};
};

class CfgWeapons {
class Default;
class GrenadeLauncher : Default {};
class Throw : GrenadeLauncher {
	scope = protected;
	autoAimEnabled = false;
	cursor = "\ca\Weapons\Data\clear_empty";
	cursoraim = "Vehicle_Grenade_W";
	cursorSize = 1;
	value = 0;
	type = VSoft;
	displayName = $STR_DN_THROW;
	canDrop = false;
	muzzles[] = {"HandGrenade_Stone", "HandGrenadeMuzzle", "SmokeShellMuzzle"};

	class ThrowMuzzle : GrenadeLauncher {
		cursor = "Air_Dot";
		cursoraim = "Vehicle_Grenade_W";
		cursorSize = 1;
		sound[] = {"", db-70, 1};
		reloadSound[] = {"", 0.000316228, 1};
		aiDispersionCoefX = 6;
		aiDispersionCoefY = 6;
		reloadTime = 0;
		magazineReloadTime = 0;
		enableAttack = false;
		showEmpty = 0;
		autoReload = true;
		modelOptics = "";
		minRange = 30;
		minRangeProbab = 0.5;
		midRange = 45;
		midRangeProbab = 0.2;
		maxRange = 60;
		maxRangeProbab = 0.03;
	};

	class HandGrenadeMuzzle : ThrowMuzzle {
		magazines[] = {"HandGrenade", "HandGrenade_West", "HandGrenade_East"};
	};

	class HandGrenade_Stone : ThrowMuzzle {
		magazines[] = {"HandGrenade_Stone"};
		displayName = $STR_DN_STONE;
		minRange = 5;
		minRangeProbab = 0.01;
		midRange = 45;
		midRangeProbab = 0.1;
		maxRange = 80;
		maxRangeProbab = 0.01;
	};

	class SmokeShellMuzzle : ThrowMuzzle {
		displayName = $STR_MN_SMOKE;
		magazines[] = {"SmokeShell", "SmokeShellYellow", "SmokeShellcs", "SmokeShellGreen", "SmokeShellPurple", "SmokeShellBlue", "SmokeShellOrange"};
		cursor = "Vehicle_Grenade_W";
		cursorAim = "\ca\Weapons\Data\clear_empty";
                   scope = 2;
	};
   };
};


Share this post


Link to post
Share on other sites
class CfgMagazines {

class Default; // External class reference

class CA_Magazine : Default {};

class HandGrenade : CA_Magazine {};

class HandGrenadeTimed : HandGrenade {};

class SmokeShell : HandGrenade {};

class SmokeShellcs : SmokeShell {

displayName = $STR_MN_SMOKE_RED;

try displayName = "my exclusive smoke shell";

Share this post


Link to post
Share on other sites

Please ... so many bad practice and faults in that config.

You need to learn a2 config definition:

http://pastebin.jonasscholz.de/242

(didnt fix your problem AND unfortunately multiple magazine array definitions overwrite each other)

Share this post


Link to post
Share on other sites
Sign in to follow this  

×