GSP167 1 Posted August 7, 2014 Hello. I'm fairly new to modding, I recently managed to convert Arma 2's Glock 17 to Arma 3 and everything appears to be working fine except that, as said in the title, the slide will not lock back when the magazine is empty, and also it will not slide back on the last magazine round. Here's the video of what it does: https://www.youtube.com/watch?v=JdfJlgMUD6Y I'm sure the problem is either caused by something in my model.cfg or config.cpp files. config.cpp class CfgPatches { class g17_Laroche { units[] = {}; weapons[] = {"g17_laroche"}; requiredVersion = 0.100000; requiredAddons[] = {"A3_Weapons_F"}; }; }; class Mode_SemiAuto; //class Mode_FullAuto; class CfgWeapons { /*extern*/ class Pistol; class Pistol_Base_F: Pistol { /*extern*/ class WeaponSlotsInfo; }; class g17_laroche: Pistol_Base_F { author = "V. Novak"; _generalMacro = "g17_laroche"; scope = 2; model = "\G17\glock17.p3d"; picture = "\G17\Data\glock17_ca.paa"; UiPicture = "\G17\Data\glock17_ca.paa"; magazines[] = {"16Rnd_9x21_Mag", "30Rnd_9x21_Mag"}; //modes[] = {"Single","FullAuto"}; // test reloadAction = "GestureReloadPistol"; displayname = "Glock 17"; dexterity = 2; bullet1[] = {"A3\sounds_f\weapons\shells\9mm\metal_9mm_01", 0.501187, 1, 15}; bullet2[] = {"A3\sounds_f\weapons\shells\9mm\metal_9mm_02", 0.501187, 1, 15}; bullet3[] = {"A3\sounds_f\weapons\shells\9mm\metal_9mm_03", 0.501187, 1, 15}; bullet4[] = {"A3\sounds_f\weapons\shells\9mm\metal_9mm_04", 0.501187, 1, 15}; bullet5[] = {"A3\sounds_f\weapons\shells\9mm\dirt_9mm_01", 0.398107, 1, 15}; bullet6[] = {"A3\sounds_f\weapons\shells\9mm\dirt_9mm_02", 0.398107, 1, 15}; bullet7[] = {"A3\sounds_f\weapons\shells\9mm\dirt_9mm_03", 0.398107, 1, 15}; bullet8[] = {"A3\sounds_f\weapons\shells\9mm\dirt_9mm_04", 0.398107, 1, 15}; bullet9[] = {"A3\sounds_f\weapons\shells\9mm\grass_9mm_01", 0.223872, 1, 15}; bullet10[] = {"A3\sounds_f\weapons\shells\9mm\grass_9mm_02", 0.223872, 1, 15}; bullet11[] = {"A3\sounds_f\weapons\shells\9mm\grass_9mm_03", 0.223872, 1, 15}; bullet12[] = {"A3\sounds_f\weapons\shells\9mm\grass_9mm_04", 0.223872, 1, 15}; soundBullet[] = {"bullet1", 0.083000, "bullet2", 0.083000, "bullet3", 0.083000, "bullet4", 0.083000, "bullet5", 0.083000, "bullet6", 0.083000, "bullet7", 0.083000, "bullet8", 0.083000, "bullet9", 0.083000, "bullet10", 0.083000, "bullet11", 0.083000, "bullet12", 0.083000}; sounds[] = {"StandardSound", "SilencedSound"}; class BaseSoundModeType { weaponSoundEffect = "DefaultRifle"; closure1[] = {"A3\sounds_f\weapons\closure\closure_handgun_3", 1.035142, 1, 10}; closure2[] = {"A3\sounds_f\weapons\closure\closure_handgun_3", 1.035142, 1.100000, 10}; soundClosure[] = {"closure1", 0.500000, "closure2", 0.500000}; }; class StandardSound: BaseSoundModeType { begin1[] = {"A3\sounds_f\weapons\pistols\pistol_st_1", 0.562341, 1, 700}; begin2[] = {"A3\sounds_f\weapons\pistols\pistol_st_2", 0.562341, 1, 700}; begin3[] = {"A3\sounds_f\weapons\pistols\pistol_st_3", 0.562341, 1, 700}; soundBegin[] = {"begin1", 0.330000, "begin2", 0.330000, "begin3", 0.340000}; }; class SilencedSound: BaseSoundModeType { begin1[] = {"A3\sounds_f\weapons\silenced\silent-07", 0.562341, 1, 200}; begin2[] = {"A3\sounds_f\weapons\silenced\silent-08", 0.562341, 1, 200}; soundBegin[] = {"begin1", 0.500000, "begin2", 0.500000}; }; reloadtime = 0.130000; dispersion = 0.003000; drySound[] = {"A3\sounds_f\weapons\other\dry1", 0.398107, 1, 20}; reloadMagazineSound[] = {"A3\sounds_f\weapons\pistols\p07_reload", 1.000000, 1, 10}; recoil = "recoil_pistol_light"; recoilProne = "recoil_prone_pistol_light"; class Library { libTextDesc = "Designed for professionals, the GLOCK 17, in 9x19, is the most widely used law enforcement pistol worldwide"; }; descriptionShort = "Glock 17 9mm"; class WeaponSlotsInfo: WeaponSlotsInfo { mass = 20; class CowsSlot { }; }; inertia = 0.100000; class ItemInfo { priority = 2; }; }; /*class hgun_P07_snds_F: hgun_P07_F { author = "$STR_A3_Bohemia_Interactive"; _generalMacro = "hgun_P07_snds_F"; class LinkedItems { class LinkedItemsMuzzle { slot = "MuzzleSlot"; item = "muzzle_snds_L"; }; }; };*/ }; enum { destructengine = 2, destructdefault = 6, destructwreck = 7, destructtree = 3, destructtent = 4, stabilizedinaxisx = 1, stabilizedinaxesxyz = 4, stabilizedinaxisy = 2, stabilizedinaxesboth = 3, destructno = 0, stabilizedinaxesnone = 0, destructman = 5, destructbuilding = 1 } model.cfg // G17 Model.cfg class cfgSkeletons { class Default { isDiscrete = 1; skeletonInherit = ""; skeletonBones[] = {}; }; class nov_Pistol: default { SkeletonBones[]= { "base", "", "magazine","base", "bullet","magazine", "hammer","base", "slide","base", "trigger","base", "zasleh", "base" }; }; } class CfgModels { class Default { sections[] = {}; sectionsInherit=""; skeletonName = ""; }; class nov_Pistol:Default { skeletonName="nov_Pistol"; sections[]= { "zasleh", "magazine" }; class Animations { class no_magazine { type="hide"; source="hasMagazine"; selection="magazine"; minValue=0; maxValue=1.00000; hideValue=0.5; unhideValue = -1.0; }; class no_magazine_slide_back { type="translation"; source="hasMagazine"; memory = 1;//by default animPeriod = 0;//Unknown selection="slide"; axis="slide_axis"; minValue = 0.0;//rad 0.0 maxValue = 1.0;//rad 57.29578 minPhase = 0.0;//rad 0.0 maxPhase = 1.0;//rad 57.29578 offset0 = 0.0; offset1 = -0.25; }; class muzzleFlashROT { type="rotationX"; source="ammoRandom"; //use ammo count as phase for animation sourceAddress="loop"; //loop when phase out of bounds selection="zasleh"; //selection we want to rotate axis=""; //no own axis - center of rotation is computed from selection centerFirstVertex=true; //use first vertex of selection as center of rotation minValue=0; maxValue=4; //rotation angle will be 360/4 = 90 degrees angle0="rad 0"; angle1="rad 360"; }; class slide { type="translation"; source="reload"; memory = 1;//by default animPeriod = 0;//Unknown selection="slide"; axis="slide_axis"; minValue = 0.0;//rad 0.0 maxValue = 1.0;//rad 57.29578 minPhase = 0.0;//rad 0.0 maxPhase = 1.0;//rad 57.29578 offset0 = 0.0; offset1 = -0.25; }; class recoil { type="rotationZ"; axis="recoil_axis"; source="reload"; selection="base"; minValue=0; maxValue=1; angle0 = 0.0;//rad 0.0; angle1 = 0.25;//rad -28.64789; }; class hammerFire { type="rotationZ"; axis="hammer_axis"; source="reload"; selection="hammer"; minValue=0; maxValue=0.4; angle0 = 0.0;//rad 0.0; angle1 = 1.25;//rad -28.64789; }; /*class hammer { type="rotationZ"; axis="hammer_axis"; source="hasMagazine"; selection="hammer"; minValue=0; maxValue=1; angle0 = 1.25;//rad 0.0; angle1 = 0.0;//rad -28.64789; };*/ class reload_magazine_hide { //hide = .45, min = 0, max = 0.5 type="hide"; source="reloadMagazine"; sourceAddress="mirror"; selection="magazine"; minValue=0.0; maxValue=0.4125; hideValue=0.545454; }; class reload_magazine_translate_1 { type="translation"; axis="magazine_axis"; source="reloadMagazine"; selection="magazine"; minValue=0.165; maxValue=0.225; offset0 = 0.0; offset1 = 2.0; }; class reload_magazine_translate_2 { type="translation"; axis="magazine_axis"; source="reloadMagazine"; selection="magazine"; minValue=0.6; maxValue=0.65; offset0 = 0.0; offset1 = -2.0; }; };//Animations };//modelclass class glock17: nov_pistol { }; } Share this post Link to post Share on other sites
da12thMonkey 1770 Posted August 7, 2014 Use the IsEmpty or IsEmptyNoReload animation source in the model.cfg IIRC, IsEmpty will lock the slide back when the magazine is totally expended or during a reload when the magazine is withdrawn (prior to inserting a new one) but IsEmptyNoReload will only lock it back when the magazine is expended and will snap forward again when a new one is inserted. Share this post Link to post Share on other sites
GSP167 1 Posted August 7, 2014 Use the IsEmpty or IsEmptyNoReload animation source in the model.cfgIIRC, IsEmpty will lock the slide back when the magazine is totally expended or during a reload when the magazine is withdrawn (prior to inserting a new one) but IsEmptyNoReload will only lock it back when the magazine is expended and will snap forward again when a new one is inserted. Hey, thanks a lot it worked! ;) Share this post Link to post Share on other sites