{"name":"Arma 3: Ropes","title":"Arma 3: Ropes","type":"topic","url":"https://community.bistudio.com/wiki/Arma_3:_Ropes","revid":308381,"updated":"2022-02-27T11:16:54Z","aliases":[],"markdown":"### Commands\n\nSee Ropes and Sling Loading command group.\n\n### Config\n\n#### Rope Type\n\nA rope stretches and breaks following the formula:\n\n```cpp\nconst float maxRopeStretchLength = (desiredLength * maxRelLength) + maxExtraLength;\nif (currentLength > maxRopeStretchLength) { /* breaks */ };\n```\n\nConfig.cpp declaration:\n\n```cpp\nclass CfgVehicles\n{\n    class Rope;\n    class RopeRabbit : Rope\n    {\n        maxRelLenght = 1.1;                    // \"Lenght\" is a typo but intentional! Same for maxExtraLenght\n        maxExtraLenght = 20;\n        springFactor = 0.5;                    // higher == less stretchy rope\n        segmentType = \"RopeSegmentRabbit\";    // reference to CfgNonAIVehicles' class\n        torqueFactor = 0.5;\n        dampingFactor[] = {1.0,2.5,1.0};\n        model = \"\\A3\\Animals_F\\rabbit\\rabbit_F.p3d\";\n    };\n};\n\nclass CfgNonAIVehicles\n{\n    class RopeSegmentRabbit\n    {\n        scope = 2;\n        displayName = \"\";\n        simulation = \"ropesegment\";\n        autocenter = 0;\n        animated = 0;\n        model = \"\\A3\\Animals_F\\rabbit\\rabbit_F.p3d\";\n    };\n};\n```\n\n#### Rope End\n\nTBD","sections":[{"heading":"Commands","level":3,"markdown":"See Ropes and Sling Loading command group."},{"heading":"Config","level":3,"markdown":""},{"heading":"Rope Type","level":4,"markdown":"A rope stretches and breaks following the formula:\n\n```cpp\nconst float maxRopeStretchLength = (desiredLength * maxRelLength) + maxExtraLength;\nif (currentLength > maxRopeStretchLength) { /* breaks */ };\n```\n\nConfig.cpp declaration:\n\n```cpp\nclass CfgVehicles\n{\n    class Rope;\n    class RopeRabbit : Rope\n    {\n        maxRelLenght = 1.1;                    // \"Lenght\" is a typo but intentional! Same for maxExtraLenght\n        maxExtraLenght = 20;\n        springFactor = 0.5;                    // higher == less stretchy rope\n        segmentType = \"RopeSegmentRabbit\";    // reference to CfgNonAIVehicles' class\n        torqueFactor = 0.5;\n        dampingFactor[] = {1.0,2.5,1.0};\n        model = \"\\A3\\Animals_F\\rabbit\\rabbit_F.p3d\";\n    };\n};\n\nclass CfgNonAIVehicles\n{\n    class RopeSegmentRabbit\n    {\n        scope = 2;\n        displayName = \"\";\n        simulation = \"ropesegment\";\n        autocenter = 0;\n        animated = 0;\n        model = \"\\A3\\Animals_F\\rabbit\\rabbit_F.p3d\";\n    };\n};\n```"},{"heading":"Rope End","level":4,"markdown":"TBD"}],"categories":["Arma 3: Editing","Stubs"],"groups":["General"]}