{"name":"ropeLength","operator":null,"title":"ropeLength","type":"command","url":"https://community.bistudio.com/wiki/ropeLength","revid":364981,"updated":"2024-07-04T19:58:04Z","groups":["Ropes and Sling Loading"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.34"}],"since":{"game":"arma3","name":"Arma 3","version":"1.34"},"arma3_since":"1.34","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Return rope length in meters (set by ropeCreate, ropeCut, ropeUnwind).\n\n> [!NOTE]\n> Returned rope length will remain the same, even if the rope is stretched.","syntaxes":[{"syntax":"ropeLength rope","since":null,"effect":null,"exec":null,"params":[{"name":"rope","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"rope: Object"}],"returns":{"type":"Number","types":["Number"],"description":null,"text":"Number"},"form":"unary","operator":null,"left":null,"right":{"text":"rope","types":["Object"]}}],"examples":[{"text":"```sqf\n_length = ropeLength (ropes heli1 select 0);\n```","code":["_length = ropeLength (ropes heli1 select 0);"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["ropes","canSlingLoad","enableRopeAttach","getSlingLoad","ropeAttachedObjects","ropeAttachTo","ropeDestroy","ropeUnwound","ropeAttachedTo","ropeCreate","ropeDetach","ropeAttachEnabled","ropeCut","ropeEndPosition","ropeUnwind","setSlingLoad","slingLoadAssistantShown"],"notes":[{"user":"Sa-Matra","date":"2024-06-08T04:40:02Z","text":"Returns 0 for rope segments. To get length of individual segment, do `vectorMagnitude vectorUpVisual _segment * 0.3`. 0.3 is model height of `RopeSegment`, you can calculate it using boundingBox for other rope types."}],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Ropes and Sling Loading","Introduced with Arma 3 version 1.34","Scripting Commands"]}