Barba-negra 117 Posted April 27, 2020 Hi all guys, I am currently working on a new submarine for arma3, I have had a problem with the doors, I do not understand why they open and close instantly, if I have set the speed according to the animation command for doors, any idea what's wrong guys? here I leave the model.cfg and the config.cpp Model.cfg class CfgSkeletons { class Default { isDiscrete = 1; skeletonInherit = ""; skeletonBones[] = {}; }; class Test_House_01_F_01_skeleton_01: Default { skeletonInherit = "Default"; skeletonBones[] = { "Door_1", "", "Door_2", "", "Door_Handle_2", "Door_2", "Door_Handle_2_axis", "Door_2", "Door_3", "", "Door_Handle_3", "Door_3", "Door_Handle_3_axis", "Door_3", "Door_4", "", "Door_Handle_4", "Door_4", "Door_Handle_4_axis", "Door_4", "Door_5", "", "Door_Handle_5", "Door_5", "Door_Handle_5_axis", "Door_5", "Glass_1_hide", "", "Glass_1_unhide", "", "Glass_2_hide", "", "Glass_2_unhide", "", "Glass_3", "Door_1", "Glass_3_hide", "Door_1", "Glass_3_unhide", "Door_1", "Glass_3_effects", "Door_1", "Glass_4_hide", "", "Glass_4_unhide", "", "Glass_5_hide", "", "Glass_5_unhide", "", "Glass_6_hide", "", "Glass_6_unhide", "", "Glass_7_hide", "", "Glass_7_unhide", "", "Glass_8_hide", "", "Glass_8_unhide", "" }; }; class Test_House_01_dam_F_skeleton_01: Default { skeletonInherit = "Default"; skeletonBones[] = { "Dam_1", "", "Unhide_1", "", "Dam_2", "", "Unhide_2", "", "Door_1", "Dam_2", "Door_2", "Dam_2", "Door_Handle_2", "Door_2", "Door_Handle_2_axis", "Door_2", "Door_3", "", "Door_Handle_3", "Door_3", "Door_Handle_3_axis", "Door_3", "Door_4", "Dam_1", "Door_Handle_4", "Door_4", "Door_Handle_4_axis", "Door_4", "Door_5", "", "Door_Handle_5", "Door_5", "Door_Handle_5_axis", "Door_5", "porte", "porte_axis" }; }; }; class CfgModels { class Default; class Test_House_01_F_01: Default { skeletonName = "Test_House_01_F_01_skeleton_01"; sections[] = { "DamT_1", "Glass_1_hide", "Glass_2_hide", "Glass_3_hide", "Glass_4_hide", "Glass_5_hide", "Glass_6_hide", "Glass_7_hide", "Glass_8_hide" }; sectionsInherit = ""; class Animations { class Door_1_rot { type = rotation; source = Door_1_source; selection = Door_1; axis = Door_1_axis; memory = 1; minValue = 0; maxValue = 1; angle0 = 0; angle1 = (rad 110); }; class Door_2_rot: Door_1_rot { source = Door_2_source; selection = Door_2; axis = Door_2_axis; minValue = 0.1; angle1 = -(rad 120); }; class Door_Handle_2_rot_1: Door_2_rot { selection = Door_Handle_2; axis = Door_Handle_2_axis; minValue = 0; maxValue = 0.1; angle1 = -(rad 50); }; class Door_Handle_2_rot_2: Door_Handle_2_rot_1 { minValue = 0.1; maxValue = 0.4; angle1 = (rad 50); }; class Door_3_rot: Door_1_rot { source = Door_3_source; selection = Door_3; axis = Door_3_axis; minValue = 0.1; angle1 = (rad 110); }; class Door_Handle_3_rot_1: Door_3_rot { selection = Door_Handle_3; axis = Door_Handle_3_axis; minValue = 0; maxValue = 0.1; angle1 = -(rad 50); }; class Door_Handle_3_rot_2: Door_Handle_3_rot_1 { minValue = 0.1; maxValue = 0.4; angle1 = (rad 50); }; class Door_4_rot: Door_1_rot { source = Door_4_source; selection = Door_4; axis = Door_4_axis; minValue = 0.1; angle1 = -(rad 140); }; class Door_Handle_4_rot_1: Door_4_rot { selection = Door_Handle_4; axis = Door_Handle_4_axis; minValue = 0; maxValue = 0.1; angle1 = -(rad 50); }; class Door_Handle_4_rot_2: Door_Handle_4_rot_1 { minValue = 0.1; maxValue = 0.4; angle1 = (rad 50); }; class Door_5_rot: Door_1_rot { source = Door_5_source; selection = Door_5; axis = Door_5_axis; minValue = 0.1; angle1 = -(rad 110); }; class Door_Handle_5_rot_1: Door_5_rot { selection = Door_Handle_5; axis = Door_Handle_5_axis; minValue = 0; maxValue = 0.1; angle1 = -(rad 50); }; class Door_Handle_5_rot_2: Door_Handle_5_rot_1 { minValue = 0.1; maxValue = 0.4; angle1 = (rad 50); }; class Glass_1_hide { type = hide; source = Glass_1_source; selection = Glass_1_hide; minValue = 0; maxValue = 1; hideValue = 0.99999; }; class Glass_1_unhide: Glass_1_hide { selection = Glass_1_unhide; hideValue = 0; unhideValue = 0.99999; }; class Glass_2_hide: Glass_1_hide { source = Glass_2_source; selection = Glass_2_hide; }; class Glass_2_unhide: Glass_1_unhide { source = Glass_2_source; selection = Glass_2_unhide; }; class Glass_3_hide: Glass_1_hide { source = Glass_3_source; selection = Glass_3_hide; }; class Glass_3_unhide: Glass_1_unhide { source = Glass_3_source; selection = Glass_3_unhide; }; class Glass_4_hide: Glass_1_hide { source = Glass_4_source; selection = Glass_4_hide; }; class Glass_4_unhide: Glass_1_unhide { source = Glass_4_source; selection = Glass_4_unhide; }; class Glass_5_hide: Glass_1_hide { source = Glass_5_source; selection = Glass_5_hide; }; class Glass_5_unhide: Glass_1_unhide { source = Glass_5_source; selection = Glass_5_unhide; }; class Glass_6_hide: Glass_1_hide { source = Glass_6_source; selection = Glass_6_hide; }; class Glass_6_unhide: Glass_1_unhide { source = Glass_6_source; selection = Glass_6_unhide; }; class Glass_7_hide: Glass_1_hide { source = Glass_7_source; selection = Glass_7_hide; }; class Glass_7_unhide: Glass_1_unhide { source = Glass_7_source; selection = Glass_7_unhide; }; class Glass_8_hide: Glass_1_hide { source = Glass_8_source; selection = Glass_8_hide; }; class Glass_8_unhide: Glass_1_unhide { source = Glass_8_source; selection = Glass_8_unhide; }; }; }; class porte: Default { skeletonName = "Test_House_01_dam_F_skeleton_01"; sections[] = {}; sectionsInherit = ""; class Animations { class Porte_Rotation { type="rotation"; source="Porte"; selection="porte"; axis="porte_axis"; memory=1; minValue="0"; maxValue="1"; angle0=0; angle1="rad 100"; }; }; }; }; Config.cpp class CfgPatches { class TestDoor { requiredAddons[] = {"A3_Structures_F"}; requiredVersion = 0.1; units[] = {"Porte_Rotation"}; weapons[] = {}; }; }; class CfgVehicles { class House; class House_F : House { class DestructionEffects; }; class Porte_Rotation : House_F { scope = 2; displayName = "Alabama Puerta"; model = "AlabamaPuerta\Porte.p3d"; vehicleClass = "Structures"; mapSize = 20.27; cost = 40000; class AnimationSources { class Porte_Rotation { source = "user"; animPeriod = 2; initPhase = 1; }; }; class UserActions { class Porte_Rotation_Open { displayName = "Open Door"; radius = 100; position = "porte_axis"; showWindow = 0; onlyForPlayer = 1; condition = (this animationPhase 'Porte_Rotation') < 0.5; statement = "this animate ['Porte_Rotation', 1, 0.1]; playSound3D [""ZNV2\sonidos\escotilla1.wss"", this, false, getPosASL this, 1,1,0]"; }; class Porte_Rotation_Close : Porte_Rotation_Open { displayName = "Close Door"; condition = (this animationPhase 'porte_Rotation') >= 0.5; statement = "this animate ['Porte_Rotation', 0, 0.1]; playSound3D [""ZNV2\sonidos\cerrada01.wss"", this, false, getPosASL this, 1,1,0]"; }; }; }; }; Share this post Link to post Share on other sites
cervantes 330 Posted April 27, 2020 hi here 🙂 i generaly use USER animation source instead source = Door_3_source; you can use source = "USER"; and define anim period in your config.cpp in your model.cfg class mydoor { type = "rotationX"; source = "User"; selection = "mydoor"; axis = "mydoor_axis"; memory = 1; minValue = "rad 0"; maxValue = "rad +90"; angle0 = "rad 0"; angle1 = "rad +90"; }; in your config.cpp class AnimationSources { class mydoor { initPhase = 0; animPeriod = 1; }; of course you need add a animation activation in your class UserActions { class openmydoor { onlyforplayer = 1; displayName = "open mydoor"; position = "pos ua"; radius = 9; condition = "(this animationphase ""mydoor"" <=0)"; statement = "this animate [""mydoor"", 1];"; }; same for close your door. 2 Share this post Link to post Share on other sites
Barba-negra 117 Posted April 27, 2020 excellent my friend @cervantes, it has worked Share this post Link to post Share on other sites
cervantes 330 Posted April 27, 2020 with pleasure 🙂 Share this post Link to post Share on other sites