Jump to content
Sign in to follow this  
granQ

Fire modes for tank

Recommended Posts

I made so you can fire: singel, 4 burst, 8 burst with a 40 mm cannon. (like in real life). It worked fine and was just testing it with some mates before release (aim to release it on friday) when the diffrent fire modes all turned into "singel" fire.

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

class CfgAmmo

{

class Default {};

class BulletSingle: Default {};

class ExplosiveBullet: BulletSingle {};

class SFPakan40: ExplosiveBullet

{

airLock=1;

soundHit[]={"\SFP_strf90\sounds\krevad.ogg",db30,1};

cost=40;

hit=80;

indirectHit=15;

indirectHitRange=4;

minRange=20;

minRangeProbab=0.5;

midRange=1000;

midRangeProbab=0.5;

maxRange=2000;

maxRangeProbab=0.5;

tracerColor[]={1,0.200000,0.00000,1};

tracerRColor[]={1,0.200000,0.00000,1};

explosive=1;

};

class SFPakan40pil : BulletSingle

{

cost=40;

airLock=0;

soundHit[]={"\SFP_strf90\sounds\krevad.ogg",db30,1};

hit=160;

indirectHit=3;

indirectHitRange=1;

minRange=20;

minRangeProbab=0.5;

midRange=1000;

midRangeProbab=0.5;

maxRange=2000;

maxRangeProbab=0.5;

tracerColor[]={1,0.200000,0.00000,1};

tracerRColor[]={1,0.200000,0.00000,1};

explosive=0;

};

class SFPakan40pil4 : SFPakan40pil

{

minRange=20;

minRangeProbab=0.9;

midRange=1000;

midRangeProbab=0.9;

maxRange=2000;

maxRangeProbab=0.9;

};

class SFPakan403p : BulletSingle

{

cost=40;

airLock=1;

soundHit[]={"\SFP_strf90\sounds\krevad.ogg",db30,1};

hit=120;

indirectHit=3;

indirectHitRange=1;

minRange=20;

minRangeProbab=0.5;

midRange=1000;

midRangeProbab=0.5;

maxRange=2000;

maxRangeProbab=0.5;

tracerColor[]={1,0.200000,0.00000,1};

tracerRColor[]={1,0.200000,0.00000,1};

explosive=1;

};

class SFPakan403p4 : SFPakan403p

{

minRange=20;

minRangeProbab=0.9;

midRange=1000;

midRangeProbab=0.9;

maxRange=3000;

maxRangeProbab=0.9;

};

class SFPakan40kul : SFPakan40

{

cost=40;

hit=100;

indirectHit=10;

indirectHitRange=2;

};

class Bullet7_6: BulletSingle {};

class SFPksp39: Bullet7_6

{

airLock=1;

hit=10;

cost=5;

tracerColor[]={1,0.25000,0.12500,0.5};

minRange=1;

minRangeProbab=0.9;

midRange=500;

midRangeProbab=0.75;

maxRange=1000;

maxRangeProbab=0.25;

};

};

class CfgWeapons

{

class Default {};

class Cannon30: Default {};

class SFPakan40: Cannon30

{

displayName="Akan";

displayNameMagazine="Kulspräng";

shortNameMagazine="Kulspräng";

magazines[]={"SFPakan403Pmag","SFPakan40Pilmag","SFPakan40mag","SFPakan40kulmag"};

initSpeed=1350;

modes[] = {"gas1", "gas2", "gas3"};

class gas1

{

ammo="SFPakan40kul";

multiplier=1;

burst=1;

displayName="Kulspräng";

sound[]={"",db10,1};

soundContinuous=0;

reloadTime=0.25000;

ffcount = 6;

ffMagnitude=1;

ffFrequency=5;

dispersion=0.002500;

aiDispersionCoefX=5.000000;

aiDispersionCoefY=2.000000;

recoil="mgunBurst3";

maxLeadSpeed=300;

autoFire = false;

useAction= false;

useActionTitle="";

aiRateOfFire=0;

aiRateOfFireDistance=0;

};

class gas2

{

ammo="SFPakan40kul";

multiplier=1;

burst=4;

displayName="Kulspräng 4 Skott";

sound[]={"",db10,1};

soundContinuous=0;

reloadTime=0.25000;

ffcount = 6;

ffMagnitude=1;

ffFrequency=5;

dispersion=0.002500;

aiDispersionCoefX=5.000000;

aiDispersionCoefY=2.000000;

maxLeadSpeed=300;

recoil="mgunBurst3";

autoFire = false;

useAction= false;

useActionTitle="";

aiRateOfFire=0;

aiRateOfFireDistance=0;

};

class gas3

{

ammo="SFPakan40kul";

multiplier=1;

burst=8;

displayName="Kulspräng 8 skott";

sound[]={"",db10,1};

soundContinuous=0;

reloadTime=0.25000;

ffcount = 6;

ffMagnitude=1;

ffFrequency=5;

dispersion=0.002500;

aiDispersionCoefX=5.000000;

aiDispersionCoefY=2.000000;

maxLeadSpeed=300;

recoil="mgunBurst3";

autoFire = false;

useAction= false;

useActionTitle="";

aiRateOfFire=0;

aiRateOfFireDistance=0;

};

};

class SFPakan40kulMag:SFPakan40

{

nameSound="shell";

reloadTime=6.66;

count=24;

initSpeed=1350;

};

class SFPakan40Mag:SFPakan40

{

nameSound="shell";

count = 24;

displayNameMagazine="Spräng";

shortNameMagazine="Spräng";

modes[] = {"gas1", "gas2", "gas3"};

class gas1

{

ammo="SFPakan40";

initSpeed=1350;

multiplier=1;

burst=1;

displayName="Spräng";

sound[]={"",db10,1};

soundContinuous=0;

reloadTime=0.25000;

recoil="mgunBurst3";

ffcount = 6;

ffMagnitude=1;

ffFrequency=5;

dispersion=0.002500;

aiDispersionCoefX=5.000000; // dispersion used to simulate horizontal burst

aiDispersionCoefY=2.000000;

maxLeadSpeed=300;

autoFire = false;

useAction= false;

useActionTitle="";

aiRateOfFire=0;

aiRateOfFireDistance=0;

};

class gas2

{

ammo="SFPakan40";

initSpeed=1350;

multiplier=1;

burst=4;

displayName="Spräng 4 Skott";

sound[]={"",db10,1};

soundContinuous=0;

reloadTime=0.25000;

ffcount = 6;

ffMagnitude=1;

ffFrequency=5;

dispersion=0.002500;

aiDispersionCoefX=5.000000; // dispersion used to simulate horizontal burst

aiDispersionCoefY=2.000000;

maxLeadSpeed=300;

recoil="mgunBurst3";

autoFire = false;

useAction= false;

useActionTitle="";

aiRateOfFire=0;

aiRateOfFireDistance=0;

};

class gas3

{

ammo="SFPakan40";

multiplier=1;

initSpeed=1350;

burst=8;

displayName="Spräng 8 skott";

sound[]={"",db10,1};

soundContinuous=0;

reloadTime=0.25000;

ffcount = 6;

ffMagnitude=1;

ffFrequency=5;

dispersion=0.002500;

aiDispersionCoefX=5.000000; // dispersion used to simulate horizontal burst

aiDispersionCoefY=2.000000;

maxLeadSpeed=300;

recoil="mgunBurst3";

autoFire = false;

useAction= false;

useActionTitle="";

aiRateOfFire=0;

aiRateOfFireDistance=0;

};

};

class SFPakan40PilMag: SFPakan40

{

nameSound="heat";

count = 24;

displayNameMagazine="Pil";

shortNameMagazine="Pil";

modes[] = {"gas1", "gas2", "gas3"};

class gas1

{

ammo="SFPakan40pil";

multiplier=1;

burst=1;

displayName="Pil";

sound[]={"",db10,1};

soundContinuous=0;

recoil="mgunBurst3";

reloadTime=0.25000;

initSpeed=1650;

ffcount = 6;

ffMagnitude=1;

ffFrequency=5;

dispersion=0.002500;

aiDispersionCoefX=5.000000; // dispersion used to simulate horizontal burst

aiDispersionCoefY=2.000000;

maxLeadSpeed=300;

autoFire = false;

useAction= false;

useActionTitle="";

aiRateOfFire=0;

aiRateOfFireDistance=0;

};

class gas2

{

ammo="SFPakan40pil4";

multiplier=1;

burst=4;

displayName="Pil 4 Skott";

sound[]={"",db10,1};

soundContinuous=0;

reloadTime=0.25000;

initSpeed=1650;

ffcount = 6;

ffMagnitude=1;

ffFrequency=5;

dispersion=0.002500;

aiDispersionCoefX=5.000000; // dispersion used to simulate horizontal burst

aiDispersionCoefY=2.000000;

maxLeadSpeed=300;

recoil="mgunBurst3";

autoFire = false;

useAction= false;

useActionTitle="";

aiRateOfFire=0;

aiRateOfFireDistance=0;

};

class gas3

{

ammo="SFPakan40Pil";

multiplier=1;

burst=8;

displayName="Pil 8 skott";

sound[]={"",db10,1};

soundContinuous=0;

reloadTime=0.25000;

initSpeed=1650;

ffcount = 6;

ffMagnitude=1;

ffFrequency=5;

dispersion=0.002500;

aiDispersionCoefX=5.000000; // dispersion used to simulate horizontal burst

aiDispersionCoefY=2.000000;

maxLeadSpeed=300;

recoil="mgunBurst3";

autoFire = false;

useAction= false;

useActionTitle="";

aiRateOfFire=0;

aiRateOfFireDistance=0;

};

};

class SFPakan403Pmag : SFPakan40

{

nameSound="heat";

count = 24;

displayNameMagazine="3P";

shortNameMagazine="3P";

modes[] = {"gas1","gas2","gas3"};

class gas1

{

ammo="SFPakan403p";

multiplier=1;

burst=1;

displayName="3P";

sound[]={"",db10,1};

soundContinuous=0;

recoil="mgunBurst3";

reloadTime=0.25000;

initSpeed=1950;

ffcount = 6;

ffMagnitude=1;

ffFrequency=5;

dispersion=0.002500;

aiDispersionCoefX=5.000000; // dispersion used to simulate horizontal burst

aiDispersionCoefY=2.000000;

maxLeadSpeed=300;

autoFire = false;

useAction= false;

useActionTitle="";

aiRateOfFire=0;

aiRateOfFireDistance=0;

};

class gas2

{

ammo="SFPakan403P";

multiplier=1;

burst=3;

displayName="3P 3 Skott";

sound[]={"",db10,1};

soundContinuous=0;

reloadTime=0.25000;

initSpeed=1950;

ffcount = 6;

ffMagnitude=1;

ffFrequency=5;

dispersion=0.002500;

aiDispersionCoefX=5.000000; // dispersion used to simulate horizontal burst

aiDispersionCoefY=2.000000;

maxLeadSpeed=300;

recoil="mgunBurst3";

autoFire = false;

useAction= false;

useActionTitle="";

aiRateOfFire=0;

aiRateOfFireDistance=0;

};

class gas3

{

ammo="SFPakan403P4";

multiplier=1;

burst=1;

displayName="3P Automat";

sound[]={"",db10,1};

soundContinuous=0;

reloadTime=0.25000;

initSpeed=1950;

ffcount = 6;

ffMagnitude=1;

ffFrequency=5;

dispersion=0.002500;

aiDispersionCoefX=5.000000; // dispersion used to simulate horizontal burst

aiDispersionCoefY=2.000000;

maxLeadSpeed=300;

recoil="mgunBurst3";

autoFire = true;

useAction= false;

useActionTitle="";

aiRateOfFire=0;

aiRateOfFireDistance=0;

};

};

class MGun: Default {};

class MachineGun7_6: MGun {};

class SFPksp39: MachineGun7_6

{

ammo="Sfpksp39";

displayName="KSP 39B";

displayNameMagazine="KSP 39B";

shortNameMagazine="KSP 39B";

magazines[] = {SFPksp39mag};

count=11400;

reloadTime=0.075;

sound[]={"\sfp_strf90\sounds\ksp39.wav",35.5,1};

soundContinuous=0;

initSpeed=1000;

flash="gunfire";

flashSize=0.5;

dispersion=0.0025;

maxLeadSpeed=50;

aiRateOfFire=0;

aiRateOfFireDistance=0;

autoFire=1;

optics=1;

};

class sfpksp39Mag : SFPksp39

{

nameSound="mgun";

reloadTime=0.075;

count=600;

initSpeed=800;

};

};

Hmm, hope it isn't too much code now. Wasn't sure if i should remove like the ksp39 since it has nothing todo with it. but i keep all from cfg ammo and cfg weapons.

Share this post


Link to post
Share on other sites

okey i tested with doing a new ammo kind for all fire modes. Like ak74 riffle has. That was the only thing i could see was diffrent. Still didn't work.

Strange thing is that it works perfect when alone or SP in tank but not with 2 humans in the tank.

Share this post


Link to post
Share on other sites
Guest BratZ

You said Tank? Wheres the cfgvehicles? I'm curious to see what the settings are

Share this post


Link to post
Share on other sites

sure.

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

class CfgVehicles

{

class All {};

class AllVehicles: All {};

class Land: AllVehicles {};

class LandVehicle: Land {};

class Tank: LandVehicle {};

class APC: Tank{};

class BMP: APC{};

class BMP2: BMP {};

class sfpstrf9040:BMP2

{

side=2;

displayName="Strf 9040B";

vehicleClass="SFP - Vehicles";

crew = "sfp_m90crew";

icon="\SFP_strf90\strf90.paa";

driverinaction="manactjeepdriver";

soundEnviron[]={"\sfp_strf90\sounds\band.wav",0.9,1};

soundEngine[]={"\sfp_strf90\sounds\motor.wav",1.3,1};

picture="\SFP_strf90\istrf90.paa"

maxSpeed=75;

armor=300;

canfloat=0;

accuracy=0.15;

model="\SFP_strf90\SFP_strf90.p3d";

hiddenSelections[]={"flash1","flash2","flash3"};

transportSoldier=8;

weapons[]={"SFPakan40","SFPksp39"};

magazines[]={"SFPksp39mag","SFPKsp39Mag","SFPakan40Pilmag","SFPakan40kulmag","SFPakan40kulmag","SFPakan40Pilmag","SFPakan40Pilmag","SFPakan40Pilmag","SFPakan40Pilmag","SFPakan40mag","SFPakan40mag"};

irScanRange=100;

irScanGround=1000;

fuelCapacity=666; //OOOOOH, creepy

gunnerOpticsModel="\sfp_strf90\optika_gunner";

commanderOpticsModel="optika_tank_driver";

class GunFire: sfpAutocannonSmoke {};

class GunClouds: sfpAutocannonSmoke {};

class TurretBase

{

gunAxis="OsaHlavne";

turretAxis="OsaVeze";

soundServo[]={"\SFP_strf90\sounds\servo.wav",0.1,1};

gunBeg="usti hlavne";

gunEnd="konec hlavne";

minElev=-10;

maxElev=45;

minTurn=-360;

maxTurn=360;

body="OtocVez";

gun="OtocHlaven";

};

class Turret: TurretBase {};

class HatchDriver

{

selection="poklop_driver";

axis="osa_poklop_driver";

angle=-100;

};

class HatchCommander

{

selection="poklop_commander";

axis="osa_poklop_commander";

angle=90;

};

class TransportMagazines

{

class _xx_AK74

{

magazine="SFPak5mag";

count="30*1";

};

class _xx_PK

{

magazine="SFPksp58mag";

count="5*1";

};

class _xx_HandGrenade

{

magazine="HandGrenade";

count="10*1";

};

class _xx_SVDDragunov

{

magazine="SFPpsg90mag";

count="10*1";

};

class _xx_RPGLauncher

{

magazine="SFPpskottmag";

count="3*1";

};

class _xx_GrenadeLauncher

{

magazine="SFPgrtmag";

count="3*1";

};

};

class EventHandlers

{

fired = "_this exec ""\SFP_strf90\script\rekyl.sqs"";";

};

transportAmmo=0;

transportMaxMagazines=250;

transportMaxWeapons=25;

};

class sfplvkv : sfpstrf9040

{

displayname="LvKv 90";

irScanRange=3000;

irScanGround=0;

gunnerCanSee="4+8+16 +1";

threat[]={0.600000,0.400000,1};

picture="\SFP_strf90\ilvkv.paa";

model="\SFP_strf90\SFP_lvkv.p3d";

transportSoldier=0;

weapons[]={"SFPakan40","SFPksp39"};

magazines[]={"SFPksp39mag","SFPKsp39Mag","SFPakan403Pmag","SFPakan40kulmag","SFPakan40kulmag","SFPakan403Pmag","SFPakan403Pmag","SFPakan403Pmag","SFPakan403Pmag","SFPakan403Pmag","SFPakan403Pmag"};

hiddenSelections[]={"flash1","flash2","flash3"};

class TurretBase

{

gunAxis="OsaHlavne";

turretAxis="OsaVeze";

soundServo[]={"\SFP_strf90\sounds\servo.wav",0.1,1};

gunBeg="usti hlavne";

gunEnd="konec hlavne";

minElev=-10;

maxElev=65;

minTurn=-360;

maxTurn=360;

body="OtocVez";

gun="OtocHlaven";

};

};

};

Share this post


Link to post
Share on other sites
Guest BratZ

K i don't see any changed settings in there, what I was getting at is , you know in a plane when you have a gunner the pilot has single fire.

I was curious if any of these would help you?

driverIsCommander=false;

hascommander=0;

hasGunner=1;

I may be way off track,but thats what I was thinking

Share this post


Link to post
Share on other sites

hascommander=0;

can't but that since it do have a commander. But the plane bug (that i haven't heard about) seems to be the same thing.

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  

×