Jump to content
Sign in to follow this  
erem2k

40mm GMG + Smoke Rounds

Recommended Posts

Hello there,

I've been messing around with Hunter's 40mm GMG and got idea of adding smoke rounds as an additional magazine. However, GMG doesn't fire when custom magazine is loaded - according to the .rpt, "Unknown ammo used.". Wasn't ammo declared in cfgAmmo already? Gargh, here's the ammo-magazine-weapons parth of the config. Thanks in advance, guys!

class cfgAmmo
{
class G_40mm_Smoke;
};

class cfgMagazines
{
class 200Rnd_40mm_G_belt;
class 50Rnd_40mm_Smoke_Cbelt: 200Rnd_40mm_G_belt
{
	displayName = "50Rnd 40mm Smoke";
	ammo = "G_40mm_Smoke";
	displayNameShort = "Smoke";
	count = 50;
};
};

class cfgWeapons
{
class GMG_40mm;
class Special_GMG_40mm: GMG_40mm
{
	scope = 1;
	displayName = "$STR_A3_GMG_40mm0";
	magazines[] = 
	{
		"200Rnd_40mm_G_belt",
		"96Rnd_40mm_G_belt",
		"64Rnd_40mm_G_belt",
		"32Rnd_40mm_G_belt",
		"50Rnd_40mm_Smoke_Cbelt"
	};
};
};

Share this post


Link to post
Share on other sites

class cfgAmmo
{
class G_40mm_Smoke;
};

This part is incomplete.

---------- Post added at 14:21 ---------- Previous post was at 14:13 ----------

Try something like this:

class cfgAmmo
{
class custom_ammo : G_40mm_HEDP;
{
	indirecthit = 0;
	effectsSmoke = "SmokeShellWhite";
};
};

Share this post


Link to post
Share on other sites
class cfgAmmo
{
class G_40mm_Smoke;
};

This part is incomplete.

---------- Post added at 14:21 ---------- Previous post was at 14:13 ----------

Try something like this:

class cfgAmmo
{
class custom_ammo : G_40mm_HEDP;
{
	indirecthit = 0;
	effectsSmoke = "SmokeShellWhite";
};
};

Thanks for that, it finally worked, however, is there any way to make smoke thicker and increase it's lifetime? ~20 second smoke isn't really useful for calling in CAS, y'know. Main idea is to make projectile act similar to UGL 40mm smoke grenade

Edited by Erem2k

Share this post


Link to post
Share on other sites

Now I'm just guessing here, but maybe you can use the ingame config viewer and look in the cfgAmmo and cfgMagazines for the UGL 40mm smoke. Maybe you can find something useful there. Perhaps "effectsSmoke" is set to something else?

Share this post


Link to post
Share on other sites
Now I'm just guessing here, but maybe you can use the ingame config viewer and look in the cfgAmmo and cfgMagazines for the UGL 40mm smoke. Maybe you can find something useful there. Perhaps "effectsSmoke" is set to something else?

G_40mm_Smoke is based upon SmokeShell class, and the only difference between them is a model. Investigating further into SmokeShell class, it has the same effectsSmoke = "SmokeShellWhite" inside. However, I've noticed a couple of interesting things that may be pertaining to grenade's lifetime - timeToLive, fuseDistance and explosionTime. Could someone give any insight on what these parameters regulate? No idea how to make smoke thicker though

Share this post


Link to post
Share on other sites

timeToLive defines how long it takes for a projectile to despawn. I don't know if that is the parameter that smoke grenades use when they stop, but it could be...

I think the values are in milliseconds, so 3000 = 3 seconds which I think is default for small arms projectiles. A smoke shell will need much more than that.

Share this post


Link to post
Share on other sites

I did some experiments, timeTolive seems to be specified in seconds - default smoke has timeTolive=60. explosionTime looks like initial amount of time before grenade goes off after throw - but that still leaves fuseDistance.

Share this post


Link to post
Share on other sites

fuseDistance is meant to be used with AT launchers and such weapons. It defines how far the projectile has to travel before the warhead is armed.

It should probably be zero for your smoke shells.

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  

×