Jump to content

Recommended Posts

Hey all, I'm currently working on a project, but this is my first time modding arma (and the first time having to code anything in to any game)
I have working examples for unit and outfits, but the next thing I'm on to is custom coloured smoke grenades, I started writing a config but then i noticed in game the blue shell, for example has a line; "effectsSmoke = "SmokeShellBlueEffect";" rather than an RGB that I expected.
Naturally, that completely stumped me. Do I have to create my own "SmokeShell___Effect" or can it by changed by adding an Init into the config somewhere?
as of yet I have no code worth showing, just shedding some light on it would more than appreciated!
 

tl;dr; How do I make custom coloured smoke grenades?
Thanks, Sam

  • Like 2

Share this post


Link to post
Share on other sites

For anyone interested in doing the same or anyone still willing to help I've made a simple code simply for the purpose of this grenade, it shows up as an item that can be linket to a character but it doesnt appear in the arsenal, and cannot be thrown, if anyone could share some further light it would be greatly appreciated.

class CfgPatches
{};


class CfgAmmo
{
  class GrenadeHand;
  class SmokeShellBlue;

  class SmokesShellAN: SmokeShellBlue
  {
     smokeColor[] = {0.8,0.8,1,1};
  };

};

class CfgMagazines
{
  class HandGrenade;
  class SmokeShell;

  class SmokeShellAN: SmokeShell
  {
    ammo = "SmokeShellAN";
    displayName = "Smoke Grenade (AN)";
  };
};

 

  • Like 1

Share this post


Link to post
Share on other sites

If anyone happens across this thread, I solved the issue;
 

class cfgAmmo;
{
 class SmokeShellBlue;
  {
  class smokeshelllightblue: SmokeShellBlue
   {
	smokeColor[] = {0.1,0.5,1,1};
   };
 };
};

class cfgMagazines
 {
 class SmokeShellBlue;
  {
  	class smokeshelllightblue_mag: SmokeShellBlue
	{
		author = "Nth Engine";
		ammo = "smokeshellanlightblue";
		descriptionShort = "Type: Smoke Grenade - Light Blue<br />Rounds: 1<br />Used in: Hand";
		displayName = "Smoke Grenade (Light Blue)";
		displayNameShort = "Light Blue Smoke";
	};
  };
 };

class cfgWeapons
 {
 class GrenadeLauncher;
  {
  class Throw: GrenadeLauncher
    {
	muzzles[] += {"SmokeShellLightBlue_Throw"};
	class ThrowMuzzle;
	class SmokeShellLightBlue_Throw : ThrowMuzzle
	{
			magazines[] = {"smokeshelllightblue_mag"};
	};
  };
 };

hope this helps anyone in the future

Share this post


Link to post
Share on other sites

You can further edit the 'smoke' particle effect (density, lifetime, air friction or basicly anything) patching/editing it's subclass in cfgParticles as well if you need.

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

×