GSTAVO 169 Posted August 6, 2016 Hi, I need help with my custon weapon. My model.cfg is like this: class CfgSkeletons { class BSOC_IA2 { pivotsModel=""; isDiscrete = 0; skeletonInherit = ""; skeletonBones[] = { "trigger", "", /// not in this model, but good to use "bolt", "", "bolt_catch", "", "magazine", "", "safety", "", "muzzleFlash", "", "OP", "", "ForeSight", "", "BackSight", "" }; }; }; class CfgModels { class Default; class Optic: Default { sections[]= { "zasleh" }; }; class Weapon: Default { sections[]= { "zasleh" }; htMin = 1; // Minimum half-cooling time (in seconds) htMax = 600; // Maximum half-cooling time (in seconds) afMax = 0; // Maximum temperature in case the model is alive (in celsius) mfMax = 0; // Maximum temperature when the model is moving (in celsius) mFact = 1; // Metabolism factor - number from interval <0, 1> (0 - metabolism has no influence, 1 - metabolism has full influence (no other temperature source will be considered)). tBody = 100; // Metabolism temperature of the model (in celsius) skeletonName="Weapon"; class Animations { class zaslehROT { type="rotation"; source="clockMinute"; sourceAddress="loop"; selection="zasleh"; begin="usti hlavne"; end="konec hlavne"; memory=1; minValue=0.0166665; maxValue=0.016666666666666666666666666666667; angle0="rad 0"; angle1="rad 360"; }; class magazine_hide { type="hide"; source="reloadMagazine"; sourceAddress="mirror"; selection="magazine"; minValue=0.0; maxValue=0.4; hideValue=0.5; }; class reload_ammobelt_hide: magazine_hide { selection="ammo_belt"; }; class reload_ammobelt_bottom_hide: magazine_hide { selection="ammo_belt_bottom"; }; class ammobelt_hide: magazine_hide { source="isEmpty"; selection="ammo_belt"; minValue=0.000000; maxValue=1.000000; hideValue=1.000000; }; class ammobelt_bottom_hide: ammobelt_hide { selection="ammo_belt_bottom"; }; /// 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; }; }; }; class Rifle: Weapon { skeletonName="Rifle"; class Animations: Animations { class magazine_hide:magazine_hide { sourceAddress="mirror"; minValue=0.0; maxValue=0.56; hideValue=0.36; }; class bolt_empty { type="translation"; source="isEmpty"; selection="bolt"; axis="bolt_axis"; memory=1; minValue=0.000000; maxValue=0.500000; offset0=0; offset1=0.5; }; class bullet_cover { type="rotation"; source="reload"; sourceAddress="mirror"; selection="bullet_cover"; axis="bullet_cover_axis"; memory=1; minValue=0.0; maxValue=0.5; angle0=0; angle1=-0.4; }; class bolt_fire_begin { type="translation"; source="reload"; selection="bolt"; axis="bolt_axis"; memory=1; minValue=0.000000; maxValue=0.300000; offset0=0; offset1=0.5; }; class bolt_fire_end:bolt_fire_begin { minValue=0.500000; maxValue=1.000000; offset0=0; offset1=-0.5; }; class bolt_reload_begin { type="translation"; source="reloadMagazine"; selection="bolt"; axis="bolt_axis"; memory=1; minValue=0.1; maxValue=0.15; offset0=0; offset1=0.5; }; class bolt_reload_end:bolt_reload_begin { minValue=0.980000; maxValue=1.000000; offset0=0; offset1=-0.5; }; }; }; class bsoc_gus_ia2f: bsoc_IA2Base {}; class bsoc_IA2Base: Rifle { skeletonName = "BSOC_IA2"; sectionsInherit = ""; sections[] = {"muzzleFlash","Camo"}; class Animations { class trigger /// not in this model, but good to use { type = "rotation"; source = "reload"; sourceAddress = "clamp"; selection = "trigger"; axis = "trigger_axis"; minValue = 0; maxValue = "1"; angle0 = "0"; angle1 = "rad -30"; }; class bolt { type = "translation"; source = "reload"; sourceAddress = clamp; selection = "bolt"; axis = "bolt_axis"; minValue = 0.5; maxValue = 1; offset0 = 0; offset1 = 0.3; }; class bolt_2: bolt { minValue = 0; maxValue = 0.5; offset0 = 0; offset1 = 0.7; }; class bolt_empty: bolt{ source = "isEmptyNoReload"; minValue = 0; maxValue = 1; offset0 = 0; offset1 = 1; }; class bolt_reload_move_1: bolt_empty { source="reloadMagazine"; // z: should work like that only if weapon is empty minValue=0; maxValue=0.00001; }; class bolt_reload_move_2: bolt_reload_move_1 { source="reloadMagazine"; // z: should work like that only if weapon is empty minValue=0.78; maxValue=0.80; offset1 = -1; }; class bolt_catch: bolt { selection = "bolt_catch"; axis = "bolt_catch_axis"; }; class bolt_catch_2: bolt_2 { selection = "bolt_catch"; axis = "bolt_catch_axis"; }; class bolt_catch_empty: bolt_empty { selection = "bolt_catch"; axis = "bolt_catch_axis"; }; class bolt_catch_reload_move_1: bolt_reload_move_1 { selection = "bolt_catch"; axis = "bolt_catch_axis"; }; class bolt_catch_reload_move_2: bolt_reload_move_2 { selection = "bolt_catch"; axis = "bolt_catch_axis"; }; 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; }; class muzzleFlashROT { type="rotationX"; source="ammoRandom"; //use ammo count as phase for animation sourceAddress="loop"; //loop when phase out of bounds selection="muzzleFlash"; //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 OP_ROT { type="rotation"; source="zeroing2"; // use second muzzle zeroing for rotation sourceAddress="loop"; // loop when phase out of bounds selection="OP"; // selection we want to rotate axis="OP_axis"; // has its own axis minValue=0; maxValue=3; angle0="rad 0"; angle1="rad 65"; }; class BackSight_optic { type="rotation"; source="hasOptics"; selection="BackSight"; axis="BackSight_axis"; memory=1; minValue=0.0000000; maxValue=1.0000000; angle0=0.000000; angle1=(rad 90); }; class ForeSight_optic: BackSight_optic { selection="ForeSight"; axis="ForeSight_axis"; angle1=(rad 90); }; // Rotation of fire mode switch class safety_mode_rot { type = rotation; source = weaponMode; selection = "safety"; axis = "safety_axis"; memory = 1; minValue = 0; maxValue = 0.25; angle0 = 0; angle1 = (rad -52); }; }; }; class bsoc_gus_ia2f: BSOC_IA2Base {}; }; The problem is: the magazine does not do the animation(move and hide) during de reload. Anothe problem is muzzeflashe is always "on", even when not firing. Thx. Share this post Link to post Share on other sites
Jackal326 1182 Posted August 6, 2016 'bsoc_gus_ia2f' is defined twice. Once directly above 'bsoc_IA2Base' and once at the very end of the file. That is probably not helping. Are all the other animations such as the trigger etc. working okay? If not, the above issue might be the route cause. However, if they are working and its only the two issues you posted about that are at fault, try these tips: Check that the 'magazine_axis' is two points in the memory lod as the translation animation type requires two points to form a point of origin and a direction of travel. Try changing your 'muzzleFlash' named selection to 'zasleh' and add 'zasleh' to the sections part of your 'bsoc_IA2Base' class definition: sections[]={"zasleh","Camo"}; I've never used any named selection other than 'zasleh' for my muzzle flashes on the dozens of weapons models I've worked on, and I can't remember a single time I have ever had an issue. So screw English and go with the Czech original :D Share this post Link to post Share on other sites
GSTAVO 169 Posted August 6, 2016 Thanks for help. The problem with muzzle flash is solved. :D Share this post Link to post Share on other sites
GSTAVO 169 Posted August 7, 2016 'bsoc_gus_ia2f' is defined twice. Once directly above 'bsoc_IA2Base' and once at the very end of the file. That is probably not helping. Are all the other animations such as the trigger etc. working okay? If not, the above issue might be the route cause. However, if they are working and its only the two issues you posted about that are at fault, try these tips: Check that the 'magazine_axis' is two points in the memory lod as the translation animation type requires two points to form a point of origin and a direction of travel. Try changing your 'muzzleFlash' named selection to 'zasleh' and add 'zasleh' to the sections part of your 'bsoc_IA2Base' class definition: sections[]={"zasleh","Camo"}; I've never used any named selection other than 'zasleh' for my muzzle flashes on the dozens of weapons models I've worked on, and I can't remember a single time I have ever had an issue. So screw English and go with the Czech original :D The animations aren't working yet. :( The memory LOD looks ok,, I caught from de BIS Sample and just adjust for my model. I have no idea what is wrong. Again, thanks for help. I apreciate very much. Share this post Link to post Share on other sites
x3kj 1247 Posted August 8, 2016 1) check your .rpt file for errors related to your weapon 2) pack your pbo with PboProject from mikero (it will show you all typing errors) 1 Share this post Link to post Share on other sites
GSTAVO 169 Posted August 9, 2016 Thanks for help but the problem still there, the .rpt file seens ok :mellow: Share this post Link to post Share on other sites
GSTAVO 169 Posted August 13, 2016 The problem is solved. Thank you all! The WIP post is here. Share this post Link to post Share on other sites