Jump to content
Sign in to follow this  
bilu90

Config.cpp problem

Recommended Posts

Good morning everyone,

I'm making a weapon mod but I encounter some problems with the config.cpp.

First, you have to know that one of this wepaon it's a shotgun. I don't know how to make multiples bullet get out of the muzzle simulatenously as a shotgun in reality. I try several thing as :

Burst = 5; 
multiplier = 1;

for 5 balls leave the gun(burst =5) but only one cartridge is recorded in less(multiplier =1;

But it doesn't work, 5 bullets leave the gun but as it's a auto mod for a rifle and 5 cartridges are recorded in less.

I also try this :

fireSpreadAngle=3;
simulation=shotSpread;

But my gun don't shoot anymore and i don't know if "simulation" need a value or not, I try but i didn't see any changes :/

Second, I don't have any recoil for all of my gun.

I tried this :

recoil = "gun_Recoil"; // this is  in "class Single: Mode_SemiAuto"


class CfgRecoils
{
access = 1;

gun_Recoil[] = {
		0,0,0,
		0.04,0.02,0.02,
		0.05,0.01,0.02,
		0.05,0.005,0.01,
		0.04,0.005,0.005,
		0.04,-0.001,-0.003,
		0.04,-0.002,-0.003,
		0.04,-0.002,-0.002,
		0.04,-0.001,-0.0005,
		0.04,0,0
};
};

Could you please tell me what's wrong ?

Thanks you in advance to the time you past to read this ;-)

Edited by Bilu90

Share this post


Link to post
Share on other sites
Good morning everyone,

I'm making a weapon mod but I encounter some problems with the config.cpp.

First, you have to know that one of this wepaon it's a shotgun. I don't know how to make multiples bullet get out of the muzzle simulatenously as a shotgun in reality. I try several thing as :

Burst = 5; 
multiplier = 1;

for 5 balls leave the gun(burst =5) but only one cartridge is recorded in less(multiplier =1;

But it doesn't work, 5 bullets leave the gun but as it's a auto mod for a rifle and 5 cartridges are recorded in less.

I also try this :

fireSpreadAngle=3;
simulation=shotSpread;

But my gun don't shoot anymore and i don't know if "simulation" need a value or not, I try but i didn't see any changes :/

Simulation shotSpread and fireSpreadAngle are parameters that need to be defined in the cfgAmmo class, not the your cfgWeapons class.

AFAIK there are no existing shotgun magazines already in the game, so to get a weapon that fires shotgun ammunition you need to make a custom cfgMagazines class that has the ammo = parameter defined as an ammuntion type that uses the shotSpread simulation type (this might involve having to make your own cfgAmmo class as well as a custom magazine) then make your weapon use those magazines.

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  

×