Jump to content
Sign in to follow this  
barcode6

Custom Smoke Shell Problem

Recommended Posts

My first foray into cfg making so I've tried something simple.  I want to add 4 custom color smoke shells but Ive run into some problems.  In a mission I have a soldier with a normal hand grenade, a red smokeshell and a custom one, and I can see the other two.  I can see the ammo in my gear, and I can drop it, but it doesn't appear as an option to load.  I figure it's a problem with my declarations in the weapons section and the throw part, but I can't figure it out.  There was info at OFPEC, and A-lone-wolf made a custom smokeshell addon the can be found at OFP-info but that doesn't work for me, and copying the config doesnt help me either.  I also looked at the ZIG glowsticks, which is how I at least got the ammo to appear.

Any help would be appreciated, here's the config:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#define TEast 0

#define TWest 1

#define TGuerrila 2

#define TCivilian 3

#define TSideUnknown 4

#define TEnemy 5

#define TFriendly 6

#define TLogic 7

#define true 1

#define false 0

// type scope

#define private 0

#define protected 1

#define public 2

class CfgPatches

{

       class BAR_Smoke

       {

               units[] = {};

               weapons[] = {BAR_Smoke};

               requiredVersion = 1.75;

       };

};

class CfgAmmo

{

       class Default {};

class Grenade: Default {};

class GrenadeHand: Grenade {};

class SmokeShell: GrenadeHand {};

class BAR_SmokeShellOrange: SmokeShell

{

smokeColor[]={0.100000,0.498000,0.000000,0};

};

class BAR_SmokeShellYellow: SmokeShell

{

smokeColor[]={0.100000,0.100000,0.000000,0};

};

class BAR_SmokeShellBlue: SmokeShell

{

smokeColor[]={0.000000,0.000000,0.100000,0};

};

class BAR_SmokeShellPurple: SmokeShell

{

smokeColor[]={0.627500,0.125500,0.941200,0};

};

};

class CfgWeapons

{

class Default {};

class throw: Default {};

       class GrenadeLauncher: throw{};

class HandGrenade: GrenadeLauncher{};

class SmokeShell : HandGrenade {};

class BAR_Smoke: SmokeShell

       {

magazines[]={"BAR_SmokeShellOrange","BAR_SmokeShellYellow","BAR_SmokeShellBlue","BAR_SmokeShellPurple"};

                reloadtime=1.50000;

                autoreload=1;

                reloadSound[]={"",1,1};

picture="\dtaext\equip\m\m_smokeshell.paa"; // bugfix only

};

class BAR_SmokeShellOrange: BAR_Smoke

{

ammo="BAR_SmokeShellOrange";

displayName="Smoke Shell (Orange)";

displayNameMagazine="Smoke Shell (Orange)";

shortNameMagazine="Smoke";

};

class BAR_SmokeShellYellow: BAR_Smoke

{

ammo="BAR_SmokeShellYellow";

displayName="Smoke Shell (Yellow)";

displayNameMagazine="Smoke Shell (Yellow)";

shortNameMagazine="Smoke";

};

class BAR_SmokeShellBlue: BAR_Smoke

{

ammo="BAR_SmokeShellBlue";

displayName="Smoke Shell (Blue)";

displayNameMagazine="Smoke Shell (Blue)";

shortNameMagazine="Smoke";

};

class BAR_SmokeShellPurple: BAR_Smoke

{

ammo="BAR_SmokeShellPurple";

displayName="Smoke Shell (Purple)";

displayNameMagazine="Smoke Shell (Purple)";

shortNameMagazine="Smoke";

};

};

Share this post


Link to post
Share on other sites

I know you probably did this.. but did you make sure to do this in your soldier's init?

this addweapon "BAR_Smoke"

Without it, you cant "select" the smoke nades you made.

You probably did that, just need to make sure smile_o.gif

Share this post


Link to post
Share on other sites

Do I ever feel stupid... biggrin_o.gif

For some reason I thought it became a reload for the handgrenade throw... Thanks MrZig!

Share this post


Link to post
Share on other sites

The only problem with it is that it uses the BIS smoke shells, which are ineffective cause they don't block AI view and they're hard on your system when you get a few of em down. FDF, JAM, WGL, and others have made smoke grenades that aren't as bad and they block AI view.

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  

×