Jump to content

Helicopter Gear and Gun animation mechanisation improvements


BIGNEWY

Recommended Posts

  • ED Team

Hi all, 

with the latest update some changes have been made to hardcoded helicopter gun and gear animations. The change has been made to help modders. I will post some examples below. 

Gears now work by default for any helicopter using them.

But if someone wants a more complicated animation they can use mechanisation system.

Sample of mechanisation usage :

undercarriage_movement         = 2, -- with value 2 DCS will use mechanimated gears, other values - default
mechanimations = {   -- mechanimations section starts
   LeftStrut = {    -- left strut section starts                 
                 {
                    Transition = {"Retract", "Extend"}, -- left strut extend section starts                     
                    Sequence = {
                        {C = {{"Arg", 116, "to", 1.0, "in", 0.5, "sign", 1}}},    -- gear door (arg 116) opens in 0.5 sec
                        {C = {{"Arg",  5, "to", 1.0, "in", 1.0, "sign", 1}}},    -- strut extends in 1 second
                        {C = {{"Arg", 116, "to", 0.0, "in", 0.5, "sign", -1}}},    -- gear door closes in 0.5 sec
                    },
                    Flags = {"Reversible"},
                }, -- left strut extend section ends 
                {
                    Transition = {"Extend", "Retract"}, -- left strut retract section starts                      
                    Sequence = {
                        {C = {{"Arg", 116, "to", 1.0, "in", 0.5, "sign", 1}}},    -- gear door opens
                        {C = {{"Arg",  5, "to", 0.0, "in", 1.0, "sign", -1}}},    -- strut retract
                        {C = {{"Arg", 116, "to", 0.0, "in", 0.5, "sign", -1}}},    -- gear door closes
                    },
                    Flags = {"Reversible"},
                },
             }, -- left strut retract section
             RightStrut = { -- similar to left strut with own args
                {
                    Transition = {"Retract", "Extend"},
                    Sequence = {
                        {C = {{"Arg", 115, "to", 1.0, "in", 0.5, "sign", 1}}},    -- gear door opens
                        {C = {{"Arg", 3, "to", 1.0, "in", 1.0, "sign", 1}}},    -- strut extends
                        {C = { {"Arg", 115, "to", 0.0, "in", 0.5, "sign", -1}}},    -- gear door closes
                    },
                    Flags = {"Reversible"},
                },
                {
                    Transition = {"Extend", "Retract"},
                    Sequence = {
                        {C = {{"Arg", 115, "to", 1.0, "in", 0.5, "sign", 1}}},    -- gear door opens
                        {C = {{"Arg", 3, "to", 0.0, "in", 1.0, "sign", -1}}},    -- strut retract
                        {C = {{"Arg", 115, "to", 0.0, "in", 0.5, "sign", -1}}},    -- gear door closes
                    },
                    Flags = {"Reversible"},
                },
            },
            CentralStrut = { -- central strut section has no doors, just strut movement
                {
                    Transition = {"Retract", "Extend"},
                    Sequence = {
                        {C = {{"Arg", 0, "to",  1.0, "in", 1.0, "sign", 1}}},    --  strut extends
                    },
                    Flags = {"Reversible"},
                },
                {
                    Transition = {"Extend", "Retract"},
                    Sequence = {        
                        {C = {{"Arg", 0, "to", 0.0 , "in", 1.0, "sign", -1}}},            -- gear door closes
                    },
                    Flags = {"Reversible"},
                },
            },
},-- mechanimations section ends
 

For movable turrets/gun mounts one should write `turret_data` section in config, sample :

turret_data = { -- turret section starts
            H_Min =  -86.0, -- min(left) horizontal angle(degrees) - turret horizontal argument is -1 here
            H_Max =   86.0, -- max(right) horizontal angle(degrees) - turret horizontal argument is +1 here             
            V_Min =  -60.0, -- min(low) vertical angle(degrees) - turret vertical argument is -1 here
            V_Max =   11.0, -- max(high) vertical angle(degrees) - turret vertical argument is +1 here
            H_Vel =   20.0, -- max horizontal turn speed degrees per second
            V_Vel =   20.0, -- max vertical turn speed degrees per second        
}, -- turret section ends

Thank you 

  • Like 7
  • Thanks 5

smallCATPILOT.PNG.04bbece1b27ff1b2c193b174ec410fc0.PNG

Forum rules - DCS Crashing? Try this first - Cleanup and Repair - Discord BIGNEWY#8703 - Youtube - Patch Status

Windows 11, NVIDIA MSI RTX 3090, Intel® i9-10900K 3.70GHz, 5.30GHz Turbo, Corsair Hydro Series H150i Pro, 64GB DDR @3200, ASUS ROG Strix Z490-F Gaming, HP Reverb G2

Link to comment
Share on other sites

  • BIGNEWY unlocked this topic
  • 1 month later...
  • 1 month later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...