slatts 1978 Posted January 30, 2013 So trying to make these Rifle Grenade's has been quite a journey. From crashing the game to now not firing the new ammo type I made. If I put the 203 ammo in the magazine it fires. But my one doesn't and I can't see why in the code. class CfgPatches { class SLTS_FN_Mortar { units[] = {"TK_Soldier_RM"}; weapons[]= {"SLTS_FN_mortar"}; requiredVersion = 0.1; requiredAddons[]= {"CAWeapons", "CAWeapons_E", "CAWeapons_baf"}; }; }; class CfgAmmos { class GrenadeBase; class FN_mortar_ammo_HE: GrenadeBase { hit = 50; indirecthit = 40; indirecthitrange = 15; model = "\slts_fn_mortar\fal_mortar"; }; class FN_mortar_ammo_AP: FN_mortar_ammo_HE { hit = 200; indirecthit = 5; indirecthitrange = 5; }; }; class CfgMagazines { class 1Rnd_HE_M203; class FN_mortar_HE: 1Rnd_HE_M203 { ammo = "FN_mortar_ammo_HE"; count = 1; descriptionshort = "Rifle Mortar<br/>Used in: FN FAL"; displayname = "Rifle Mortar HE"; modelspecial = "\slts_fn_mortar\vil_falpara_mortar"; }; class FN_mortar_AP: FN_mortar_HE { ammo = "FN_mortar_ammo_AP"; count = 1; descriptionshort = "Rifle Mortar<br/>Used in: FN FAL"; displayname = "Rifle Mortar AP"; modelspecial = "\slts_fn_mortar\vil_falpara_mortar_AP"; }; }; class CfgWeapons { class M203Muzzle; class RGMuzzle; class FN_FAL; class SLTS_FN_Mortar: FN_FAL { displayName = "FN FAL"; model = "\slts_fn_mortar\vil_falpara"; magazines[] = {"20Rnd_762x51_FNFAL"}; muzzles[] = {"this", "RGMuzzle"}; class RGMuzzle: M203Muzzle { displayName = "Rifle Grenade"; modeloptics = "-"; optics = 1; cameradir = "GL look"; magazines[] = {"FN_mortar_HE", "FN_mortar_AP"}; }; }; }; class cfgVehicles { class TK_Soldier_GL_EP1; class ReammoBox; class SLTS_fal_box: ReammoBox { scope = 2; accuracy = 1000; displayName = "FAL Box"; model = "\ca\weapons\AmmoBoxes\USBasicWeapons.p3d"; class TransportMagazines { class FN_mortar_HE { magazine = "FN_mortar_HE"; count = 500; }; class FN_mortar_AP { magazine = "FN_mortar_AP"; count = 500; }; class 20Rnd_762x51_FNFAL { magazine = "20Rnd_762x51_FNFAL"; count = 100; }; }; class TransportWeapons { class SLTS_FN_Mortar { weapon = "SLTS_FN_Mortar"; count = 100; }; }; }; }; Share this post Link to post Share on other sites
dimitri_harkov 10 Posted January 31, 2013 I used this for my FAL version. Works like a charm. class CfgAmmo { class G_40mm_HE; class DIH_Stg58GG_shell: G_40mm_HE { hit=30; indirectHit=6; indirectHitRange=10; minRange=20; minRangeProbab=0.300000; midRange=105; midRangeProbab=0.550000; maxRange=210; maxRangeProbab=0.050000; cost=5; CraterEffects="GrenadeCrater"; explosionEffects="GrenadeExplosion"; muzzleEffect="BIS_Effects_Rifle"; model="\ca\Weapons\granat"; }; }; class CfgMagazines { class CA_Magazine; class DIH_Stg58GG: CA_Magazine { scope=2; type=16; model="\ca\Weapons\granat"; //modelSpecial="\ca\Weapons\granat"; displayName="Gewehrgranate"; ammo="DIH_Stg58GG_shell"; initSpeed="67 + (random 2)"; fuseDistance=4; count=1; class Library { libTextDesc="Gewehrgranate"; }; }; }; class Mode_SemiAuto; class Mode_FullAuto; class CfgWeapons { class GrenadeLauncher; class p85_FAL58; class DIH_StG58: p85_FAL58 { muzzles[]= { "DIH_StG58Muzzle", "DIH_StG58_GG_Muzzle" }; class DIH_StG58Muzzle: p85_FAL58 { class ai_Single: Mode_SemiAuto { begin1[]= { "Ca\Sounds_E\Weapons_E\FNFAL\FNFAL_single_1", 1.778280, 1, 1500 }; begin2[]= { "Ca\Sounds_E\Weapons_E\FNFAL\FNFAL_single_2", 1.778280, 1, 1500 }; soundBegin[]= { "begin1", 0.500000, "begin2", 0.500000 }; reloadTime=0.085000; recoil="p85_762natoRecoil"; recoilProne="p85_762natoRecoilProne"; dispersion=0.003700; minRange=2; minRangeProbab=0.100000; midRange=200; aiRateOfFire=2; midRangeProbab=0.750000; maxRange=400; maxRangeProbab=0.050000; showtoplayer=0; }; class Single: Mode_SemiAuto { begin1[]= { "Ca\Sounds_E\Weapons_E\FNFAL\FNFAL_single_1", 1.778280, 1, 1500 }; begin2[]= { "Ca\Sounds_E\Weapons_E\FNFAL\FNFAL_single_2", 1.778280, 1, 1500 }; soundBegin[]= { "begin1", 0.500000, "begin2", 0.500000 }; reloadTime=0.085000; recoil="p85_762natoRecoil"; recoilProne="p85_762natoRecoilProne"; dispersion=0.002250; minRange=2; minRangeProbab=0.100000; midRange=20; aiRateOfFire=2; midRangeProbab=0.750000; maxRange=40; maxRangeProbab=0.050000; }; class AUTO: Mode_FullAuto { begin1[]= { "Ca\Sounds_E\Weapons_E\FNFAL\FNFAL_single_1", 1.778280, 1, 1500 }; begin2[]= { "Ca\Sounds_E\Weapons_E\FNFAL\FNFAL_single_2", 1.778280, 1, 1500 }; soundBegin[]= { "begin1", 0.500000, "begin2", 0.500000 }; reloadTime=0.085000; recoil="p85_762natoRecoil"; recoilProne="p85_762natoRecoilProne"; dispersion=0.005000; aiRateOfFire=12; }; }; class DIH_StG58_GG_Muzzle: GrenadeLauncher { displayName="Gewehrgranate"; magazines[]= { "DIH_Stg58GG" }; scopeWeapon=2; modelOptics="-"; muzzlePos="usti hlavne"; muzzleEnd="konec hlavne"; cartridgePos="nabojnicestart"; cartridgeVel="nabojniceend"; cameraDir="gl look"; memoryPointCamera="gl eye"; opticsZoomMin=0.350000; opticsZoomMax=0.950000; opticsZoomInit=0.400000; reloadTime=3.500000; recoil="MortarRecoil"; backgroundReload="false"; dispersion=0.025000; initSpeed=60; }; }; }; Cheers, D. Share this post Link to post Share on other sites