Jump to content
Sign in to follow this  
Doc_69

Fire Modes in Handguns

Recommended Posts

Hi folks,

Maybe there is someone out there who can help me out on the following problem;

I am working on an addon for alternate PDWs and was messing around trying to maek a handgun that will fire all 3 modes. Singleshot, Burst and FullAuto. I was able to get the M9SD to be able to fire both single and fullauto but not burst mode. Is there an inherent limitation built in limiting handguns to only 2 modes? When I switch through firemodes I do not even see the burst mode.

I may be going at this backwards but decided to get the config.cpp parts down right before I continue on the modelling portion.

Doc_69

Stop reading here if you hate long posts. The following is the section of the config.cpp relating to the M9 and M9SD

class M9 : Pistol {

scope = public;

model = "\ca\weapons\M9_Beretta";

modelOptics = "-";

picture = "\CA\weapons\data\equip\w_M9_ca.paa";

minRange = 2;

minRangeProbab = 0.1;

midRange = 30;

midRangeProbab = 0.8;

maxRange = 50;

maxRangeProbab = 0.04;

optics = true;

distanceZoomMin = 50;

distanceZoomMax = 50;

displayName = $STR_DN_M9;

sound[] = {"\ca\Weapons\Data\Sound\Glock2_A", db0, 1};

drySound[] = {"\ca\Weapons\Data\Sound\T33_dry_v1", 0.0001, 1};

reloadMagazineSound[] = {"\ca\Weapons\Data\Sound\pistol_reload", 0.0316228, 1};

magazines[] = {"15Rnd_9x19_M9", "15Rnd_9x19_M9SD"};

dispersion = 0.02;

ffCount = 1;

recoil = "pistolBase";

aiRateOfFire = 0.5; // delay between shots at given distance

aiRateOfFireDistance = 50;

class Library {

libTextDesc = $STR_LIB_M9;

};

};

class M9SD : M9

{

scope = public;

model = "\ca\weapons\M9_Beretta_SD";

picture = "\CA\weapons\data\equip\w_M9SD_ca.paa";

sound[] = {"\ca\Weapons\Data\Sound\Glock_Silenced_final", db-35, 1};

reloadMagazineSound[] = {"\ca\Weapons\Data\Sound\pistol_reload", 0.0316228, 1};

displayName = $STR_DN_M9SD;

drySound[] = {"\ca\Weapons\Data\Sound\T33_dry_v1", 0.0001, 1};

minRange = 2;

minRangeProbab = 0.1;

midRange = 15;

midRangeProbab = 0.8;

maxRange = 20;

maxRangeProbab = 0.04;

magazines[] = {"15Rnd_9x19_M9", "15Rnd_9x19_M9SD"};

modes[]={"Single","Burst","FullAuto"};

class Single : Mode_SemiAuto

{

multiplier=1

burst=1

displayName="M9SD Single";

dispersion=0.003000;

sound[] = {"\ca\Weapons\Data\Sound\Glock_Silenced_final", db-35, 1};

soundContinuous=0

reloadTime=0.100000;

ffCount=1

autoFire=0

aiRateOfFire=0.500000;

aiRateOfFireDistance=100

useAction=0

useActionTitle="";

};

class Burst : Mode_Burst

{

multiplier=1

burst=3

displayName="M9SD Burst";

dispersion=0.003000;

sound[] = {"\ca\Weapons\Data\Sound\Glock_Silenced_final", db-35, 1};

soundContinuous=0

reloadTime = 0.1;

ffCount = 3;

aiRateOfFire=2.500000;

aiRateOfFireDistance=100

showToPlayer = false;

useAction=0

useActionTitle="";

};

class FullAuto : Mode_FullAuto

{

multiplier=1

burst=1

displayName="M9SD Fullauto";

dispersion=0.004000;

sound[] = {"\ca\Weapons\Data\Sound\Glock_Silenced_final", db-35, 1};

soundContinuous=0

reloadTime=0.100000;

ffCount=30

autoFire=1

aiRateOfFire=5.000000;

aiRateOfFireDistance=100

useAction=0

useActionTitle="";

};

class Library {

libTextDesc = $STR_LIB_M9SD;

};

};

Share this post


Link to post
Share on other sites
Quote[/b] ]class Burst : Mode_Burst

{

multiplier=1

burst=3

displayName="M9SD Burst";

dispersion=0.003000;

sound[] = {"\ca\Weapons\Data\Sound\Glock_Silenced_final", db-35, 1};

soundContinuous=0

reloadTime = 0.1;

ffCount = 3;

aiRateOfFire=2.500000;

aiRateOfFireDistance=100

showToPlayer = false;

useAction=0

useActionTitle="";

};

whistle.gif

That means only AI can use this fire mode. Change it to true (or just remove it so it inherets the value from Mode_Burst). Anyway I'm assuming you copied this from the AK74, but as you'll notice the Burst mode on the AK74 is for AI only (to control their ammo consumption). But no, there's definately no limitation. This is a new feature that wasn't in OFP too, quite useful I'd say.

Share this post


Link to post
Share on other sites

Thanks, I appreciate the help.

Doc_69 biggrin_o.gif

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  

×