ropeCreate: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "{{Command " to "{{RV|type=command ") |
Lou Montana (talk | contribs) m (Text replacement - "\{\{( *)Informative( *)\|" to "{{$1Feature$2|$2Informative$2|") |
||
Line 8: | Line 8: | ||
| Creates a PhysX rope with given params. For <tt>Take on Helicopters</tt> syntax see [[ropeCreate_TKOH]].<br><br> | | Creates a PhysX rope with given params. For <tt>Take on Helicopters</tt> syntax see [[ropeCreate_TKOH]].<br><br> | ||
{{Informative | FROM object has to be [[ropeCreate/transport | transport]] vehicle, alive with [[enableRopeAttach | rope attachment]] enabled, TO object has to be an entity, alive with [[enableRopeAttach | rope attachment]] enabled.<br><br> | {{Feature | Informative | FROM object has to be [[ropeCreate/transport | transport]] vehicle, alive with [[enableRopeAttach | rope attachment]] enabled, TO object has to be an entity, alive with [[enableRopeAttach | rope attachment]] enabled.<br><br> | ||
<tt>ropeEndType</tt> is defined in config under <tt>"CfgNonAIVehicles" >> "RopeEnd"</tt>. Currently this is a hook that will be created on the end of the rope, and <tt>ropeEndDownVector</tt> is its orientation, [0,0,-1] for example. The <tt>"RopeEnd"</tt> is only shown when the rope is created object to object, it doesn't show on the open ended rope for some reason. There is currently no <tt>"RopeStart"</tt>}} | <tt>ropeEndType</tt> is defined in config under <tt>"CfgNonAIVehicles" >> "RopeEnd"</tt>. Currently this is a hook that will be created on the end of the rope, and <tt>ropeEndDownVector</tt> is its orientation, [0,0,-1] for example. The <tt>"RopeEnd"</tt> is only shown when the rope is created object to object, it doesn't show on the open ended rope for some reason. There is currently no <tt>"RopeStart"</tt>}} | ||
Revision as of 00:08, 7 February 2021
Description
- Description:
- Description needed
- Groups:
- Ropes and Sling Loading
Syntax
- Syntax:
- Syntax needed
- Parameters:
- [fromObject, fromPoint, toObject, toPoint, length, ropeStart, ropeEnd]: Array
- fromObject: Object - transport where the rope originates and which fly behavior will be affected
- fromPoint: String or Array - position for the rope start, either a memory point String or relative offset Array
- toObject: Object - entity which is automatically attached to the end of the rope
- toPoint: String or Array - position for the rope end, either a memory point String or relative offset Array
- length (Optional): Number - rope length in meters. Default: -1
- ropeStart (Optional): Array - array in format [ropeStartType, ropeStartDownVector] where:
- ropeStartType: String - type of the rope start (see description). Default: ""
- ropeStartDownVector: String or Array, either a memory point String or relative vector Array. If String is given, then ropeStartDownVector is calculated from fromPoint towards ropeStartDownVector memory point. Default: [0,0,-1]
- ropeEnd (Optional): Array - array in format [ropeEndType, ropeEndDownVector] where:
- Return Value:
- Return value needed
Alternative Syntax
- Syntax:
- ropeCreate [fromObject, fromPoint, length, ropeStart, ropeEnd]
- Parameters:
- [fromObject, fromPoint, length, ropeStart, ropeEnd]: Array
- fromObject: Object - transport where the rope originates and which fly behavior will be affected
- fromPoint: String or Array - position for the rope start, either a memory point String or relative offset Array
- length: Number - rope length in meters
- ropeStart (Optional): Array - array in format [ropeStartType, ropeStartDownVector] where:
- ropeStartType: String - type of the rope start (see description). Default: ""
- ropeStartDownVector: String or Array, either a memory point String or relative vector Array. If String is given, then ropeStartDownVector is calculated from fromPoint towards ropeStartDownVector memory point. Default: [0,0,-1]
- ropeEnd (Optional): Array - array in format [ropeEndType, ropeEndDownVector] where:
- Return Value:
- Object - created rope or objNull on failure
Examples
- Example 1:
myRope = ropeCreate [vehicle player, "slingload0", myCargo, [0, 0, 0], 10];
- Example 2:
myRope = ropeCreate [veh1, [0,0,-2], veh2, [0,0,0], 10];
- Example 3:
- Free end rope (Alt Syntax):
myRope = ropeCreate [vehicle player, [0,0,0], 10];
- Example 4:
- A rope with a hook on the end:
myRope = ropeCreate [heli, "slingload0", player, [0,0,2], 20, [], ["RopeEnd", [0,0,-1]]];
Additional Information
- See also:
- See also needed
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
- Posted on November 8, 2014 - 14:57 (UTC)
- Tajin
-
Doesn't work well for towing vehicles on the ground.
Their wheels don't turn freely and have a LOT of friction. You'll most likely end up flipping the vehicle over if you try to tow it.
Also note that ropes can be destroyed/cut by shooting at them. - Posted on January 4, 2015 - 03:24 (UTC)
- Feint
-
Pay special attention to what is your fromObject and what is your toObject as this will have an impact on the physics of the rope.
For example: If you want to tow an Assault CRRC from a heavier Speedboat Minigun, attach two boats together with a rope. If you drive the Speedboat Minigun and set the CRRC as the fromObject, the rope will have almost no elasticity and the CRRC will yank around as you tow it. However, if you set the CRRC as the toObject, the rope will have more elasticity and will be a little friendlier for the CRRC when you are towing it.