road runner 4344 Posted December 11, 2015 Okay guys, need some help, I have a weapon that the "magazine" doesn't disappear during the "unload" animation. It's named in the selections, and named within the model.cfg file, it's just not disappearing.I used Zach Gibson's sample for my config.cpp, and model.cfg can anyone help? Share this post Link to post Share on other sites
da12thMonkey 1943 Posted December 11, 2015 Would help if you posted the model.cfg but so far as I understand what you want, that particular feature is handled by having a type = hide animation that uses the hasMagazine animation source. From the official BIS weapon example's model.cfg, under class cfgModels\class Animations: /// Hiding of magazine if weapon has none class no_magazine { type="hide"; source="hasMagazine"; selection="magazine"; minValue=0.000000; maxValue=1.00000; hideValue=0.5; unhideValue = -1.0; }; 1 Share this post Link to post Share on other sites
road runner 4344 Posted December 11, 2015 Sorry... forgot to post it here. class CfgSkeletons{ class Default { isDiscrete=1; skeletonInherit=""; skeletonBones[]={}; }; class tb_arifle_m16a4_base: Default { skeletonBones[]= { "magazine", "", "bolt", "" }; };};class CfgModels{ class Default { sectionsInherit=""; sections[]={}; skeletonName=""; }; class tb_arifle_m16a4_base: Default { sections[]= { "magazine", "bolt" }; skeletonName="tb_arifle_m16a4_base"; class Animations { }; }; class HK416: tb_arifle_m16a4_base { class Animations { class magazine_reload_move_1 { type="translation"; source="reloadMagazine"; selection="magazine"; axis="magazine_axis"; minValue=0.145; maxValue=0.2; offset0=0; offset1=0.40000001; }; class magazine_hide { type="hide"; source="reloadMagazine"; selection="magazine"; minValue= 0; maxValue=1; minPhase= 0; maxPhase=1; hideValue=1; sourceAddress="mirror"; }; class bolt_empty { type="translation"; source="isempty"; selection="bolt"; memory=1; sourceAddress="clamp"; minValue=0; maxValue=1; begin="bolt_start"; end="bolt_end"; offset0=0; offset1=1; }; class bolt_empty_1 { type="translation"; source="reloadMagazine"; selection="bolt"; memory=1; sourceAddress="clamp"; minValue=0; maxValue=1; begin="bolt_start"; end="bolt_end"; offset0=0; offset1=1; }; }; };}; I've lost all my sample model files after the last upgrade. :( Share this post Link to post Share on other sites
da12thMonkey 1943 Posted December 11, 2015 I've lost all my sample model files after the last upgrade. :( Might be that the Arma 3 samples on Steam moved from being bundled with the tools, to being a separate download. If you want them again: http://store.steampowered.com/app/390500/ But basically the updated anims used on rifle magazines are of the format: class magazine_hide { type="hide"; source="reloadMagazine"; selection="magazine"; minValue=0.000000; maxValue=1.00000; hideValue=0.188; unhideValue = 0.550; }; class no_magazine { type="hide"; source="hasMagazine"; selection="magazine"; minValue=0.000000; maxValue=1.00000; hideValue=0.5; unhideValue = -1.0; }; class magazine_reload_move_1 { type = "translation"; source = "reloadMagazine"; selection = "magazine"; axis = "magazine_axis"; minValue = 0.145; maxValue = 0.170; offset0 = 0.0; offset1 = 0.5; }; class magazine_reload_move_2: magazine_reload_move_1 { minValue = 0.573; maxValue = 0.602; offset0 = 0.0; offset1 = -0.5; }; 1 Share this post Link to post Share on other sites
road runner 4344 Posted December 11, 2015 Yeah I just seen them, will grab them later, and can't thank you enough for the help, will throw this into my config and see what happens. Thanks a million times, that's sorted it out. :D Share this post Link to post Share on other sites
road runner 4344 Posted December 21, 2015 da12thMonkey, how do I make the magazine stay hidden slightly longer as it's appearing before the animation is complete?I can remembers another discussion about this elsewhere, but can't seem to recall which line controls the "delay in reappearing" part. Thank you sir. Share this post Link to post Share on other sites
da12thMonkey 1943 Posted December 21, 2015 Increase the unhideValue setting in your type="hide"; animation (it's there under class magazine_hide in the example I wrote before). hideValue = value of the source controller (in our case the reloadMagazine source) when the selection will hide unhideValue = value of the source controller (in our case the reloadMagazine source) when the selection will re-appear after it's been hidden Value 0 would be the instant the reload sequence starts. Value 1 would be the instant the reload sequence ends. So you want to shift the values along that 0-1 scale to get them closer to your beginning or end point of the anim. 1 Share this post Link to post Share on other sites
road runner 4344 Posted December 21, 2015 Perfect mate, many many thanks once again!! 1 Share this post Link to post Share on other sites
road runner 4344 Posted December 31, 2015 I'm needing your help again mate, for some reason despite the exact same model.cfg, and the exact same magazine, from the same weapon, inserted into another weapon, the bastard shows, even when the guy is in his underwear, the magazine stays attached to the weapon. The 3 configs are exactly the same, 2 work like a dream, the 3rd in making me want to throw chunks. What do you think is causing this? Share this post Link to post Share on other sites
Jackal326 1181 Posted December 31, 2015 I'm needing your help again mate, for some reason despite the exact same model.cfg, and the exact same magazine, from the same weapon, inserted into another weapon, the bastard shows, even when the guy is in his underwear, the magazine stays attached to the weapon. The 3 configs are exactly the same, 2 work like a dream, the 3rd in making me want to throw chunks. What do you think is causing this? Have you added an entry for the 3rd model into the model.cfg? e.g. class YOUR_NEW_MODEL: tb_arifle_m16a4_base {}; Share this post Link to post Share on other sites
road runner 4344 Posted January 1, 2016 Yes mate, it's showing in the VA, sounds work etc, I had this issue with the first weapon I made, and da12thmonkey gave me the pointer that worked.I used the previous weapons config and model cfg in fact all their folders, just edited the paths and renamed the respective files .The magazine and Bolt Are the only two things in the selections part. It's wierd as its the same magazine I just deleted the weapon around it, and imported the new one over the top of the old one.It's got me baffled lol Okay, I made a schoolboy error in the model name in the cfg wasn't the same as the actual p3d name, now it's working mate, many thanks again. Share this post Link to post Share on other sites