G'day
This is from Snypir's Config.cpp File Tutorial:
The pre-defined CfgRecoils class looks as follows:
class CfgRecoils
{
empty[]={};
impulse[]={0.050000,0.020000,0.200000,0.100000,0.030000,-0.100000,0.300000,0,0};
riffleSingle[]={0.050000,0.020000,0.040000,0.050000,0,0};
riffleSilenced[]={0.010000,0.004000,0.010000,0.050000,0,0};
LAWSingle[]={0.020000,0,0,0.050000,0.080000,0.030000,0.100000,0.030000,0.015000,0.200000,0,0};
sniperSingle[]={0.020000,0,0,0.050000,0.010000,0.020000,0.100000,0.008000,0.018000,0.200000,0,0};
riffleBurst3[]={0.050000,0.020000,0.040000,0.050000,0,0};
mgunBurst3[]={0.050000,0.020000,"0.04*1.35",0.050000,0.010000,"0.01*1.35",0.050000,0.030000,"0.04*1.35",0.050000,0.020000,"0.02*1.35",0.050000,0.040000,"0.04*1.35",0.010000,0,0};
};
In your addons you can make new recoils for your weapons!
The basics is this:
class CfgRecoils
{
MyRecoil[]={1.00,0.5,0.7};
};
That creates a new recoild named MyRecoil, that moves the weapon 0.5 units backwards and 0.7 units upwards, and doest that in 1 second. So the first number is how long the movement takes, the second is the amout of kickback and the third is the amout of upwards movement. But, thats not all. You can put many of those in a row, example:
class CfgRecoils
{
shotgun[]={0.02,0,0.01,0.05,0.05,0.15,0.4,0,0};
};
That does a recoil that first does a 0.02 second movement that moves the gun 0.01 units up (very little). Then it does a 0.05 second movement that does a small kickback (0.05 units) and a nice 0.15 units kick upwards. Then, in 0.4 seconds it moves everything back to the normal pos (0,0). That last 0,0 transform is necessary to make it look good.
Then, to use this recoil, put these to the CfgWeapons class:
recoil=shotgun;
recoilFixed=shotgun;
The 'recoil' is apparently the recoil used when standing/walkin/running and fixed is for when you are lying on the ground.
hope this helps
L8R