ropeCreate: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "</dd> </dl>" to "</dd> </dl>") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 3: | Line 3: | ||
|selected= 2 | |selected= 2 | ||
|title1= {{ | |title1= {{Template:TabView/GameTitle|tkoh}} | ||
|content1= | |content1= | ||
{{RV|type=command | {{RV|type=command | ||
Line 18: | Line 17: | ||
|p1= fromObject: [[Object]] - object where rope starts and which fly behavior will be affected | |p1= fromObject: [[Object]] - object where rope starts and which fly behavior will be affected | ||
|p2= fromPoint: [[Array]] or [[String]] - specifies where on the object the rope should start, either a string (name of memory point) or an array of three numbers (vector in model coordinates). | |p2= fromPoint: [[Array]] or [[String]] - specifies where on the object the rope should start, either a string (name of memory point) or an array of three numbers (vector in model coordinates). | ||
|p3= toObject: [[Object]] - object which is automatically attached to other side of rope (can be objNull, rope will stay with free end) | |p3= toObject: [[Object]] - object which is automatically attached to other side of rope (can be objNull, rope will stay with free end) | ||
|p4= toPoint: [[Array]] or [[String]] - specifies where on the object the rope should finish, either a string (name of memory point) or an array of three numbers (vector in model coordinates) | |p4= toPoint: [[Array]] or [[String]] - specifies where on the object the rope should finish, either a string (name of memory point) or an array of three numbers (vector in model coordinates) | ||
|p5= segments: [[Number]] - define number of segments to be created | |p5= segments: [[Number]] - define number of segments to be created | ||
|p6= length | |||
|p6= length: [[Number]] - (Optional) rope length in meters | |||
|r1= [[Object]] | |r1= [[Object]] | ||
Line 29: | Line 33: | ||
|p21= fromObject: [[Object]] - object where rope starts and which fly behavior will be affected | |p21= fromObject: [[Object]] - object where rope starts and which fly behavior will be affected | ||
|p22= fromPoint: [[Array]] or [[String]] - specifies where on the object the rope should start, either a string (name of memory point) or an array of three numbers (vector in model coordinates) | |p22= fromPoint: [[Array]] or [[String]] - specifies where on the object the rope should start, either a string (name of memory point) or an array of three numbers (vector in model coordinates) | ||
|p23= length | |||
|p24= segments | |p23= length: [[Number]] - (Optional) rope length | ||
|p25= unroll | |||
|p24= segments: [[Number]] - (Optional) define number of rope segments | |||
|p25= unroll: [[Boolean]] - (Optional) true if rope starts at one place and falls down unrolling itself, false to create it already in full length (default: false) | |||
|r2= [[Object]] | |r2= [[Object]] | ||
|x1= <code>myRope = [[ | |x1= <code>myRope = [[ropeCreate]] [<nowiki/>[[vehicle]] [[player]], "fastrope0", 10, 10, [[true]]];</code> | ||
|seealso= [[ropeDestroy]], [[ropeDetach]], [[ropeSetCargoMass]] | |seealso= [[ropeDestroy]], [[ropeDetach]], [[ropeSetCargoMass]] | ||
}} | }} | ||
|title2= {{ | |title2= {{Template:TabView/GameTitle|arma3}} | ||
|content2= | |content2= | ||
{{RV|type=command | {{RV|type=command | ||
|game1= arma3 | |game1= arma3 | ||
|version1= 1.34 | |version1= 1.34 | ||
|eff= global | |eff= global | ||
Line 53: | Line 62: | ||
|descr= Creates a PhysX rope with given params. | |descr= Creates a PhysX rope with given params. | ||
{{Feature | Informative | | {{Feature | Informative | | ||
<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 | * ''fromObject'' has to be [[ropeCreate/transport | transport]] vehicle, [[alive]] with [[enableRopeAttach | rope attachment]] enabled, ''toObject'' has to be an entity, alive with [[enableRopeAttach | rope attachment]] enabled. | ||
* <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 does not show on the open ended rope for some reason. There is currently no <tt>"RopeStart"</tt>.}} | |||
|s1= [[ropeCreate]] [fromObject, fromPoint, toObject, toPoint, length, ropeStart, ropeEnd] | |s1= [[ropeCreate]] [fromObject, fromPoint, toObject, toPoint, length, ropeStart, ropeEnd] | ||
|p1= fromObject: [[Object]] - [[ropeCreate/transport | transport]] where the rope originates and which fly behavior will be affected | |p1= fromObject: [[Object]] - [[ropeCreate/transport | transport]] where the rope originates and which fly behavior will be affected | ||
|p2= fromPoint: [[String]] or [[Array]] - position for the rope start, either a memory point [[String]] or relative offset [[Array]] | |p2= fromPoint: [[String]] or [[Array]] - position for the rope start, either a memory point [[String]] or relative offset [[Array]] | ||
|p3= toObject: [[Object]] - entity which is automatically [[ropeAttachTo | attached to]] the end of the rope | |p3= toObject: [[Object]] - entity which is automatically [[ropeAttachTo | attached to]] the end of the rope | ||
|p4= toPoint: [[String]] or [[Array]] - position for the rope end, either a memory point [[String]] or relative offset [[Array]] | |p4= toPoint: [[String]] or [[Array]] - position for the rope end, either a memory point [[String]] or relative offset [[Array]] | ||
|p5= length | |||
|p6= ropeStart | |p5= length: [[Number]] - (Optional, default -1) rope length in meters | ||
* ropeStartType: [[String]] - type of the rope start (see description) | |||
* ropeStartDownVector: [[String]] or [[Array]], either a memory point [[String]] or relative vector [[Array]]. If [[String]] is given, then <tt>ropeStartDownVector</tt> is calculated from <tt>fromPoint</tt> towards <tt>ropeStartDownVector</tt> memory point | |p6= ropeStart: [[Array]] - (Optional, default ["", [0,0,-1]]) array in format [ropeStartType, ropeStartDownVector] where: | ||
|p7= ropeEnd (Optional): [[Array]] - array in format [ropeEndType, ropeEndDownVector] where: | * ropeStartType: [[String]] - type of the rope start (see description) | ||
* ropeEndType: [[String]] - type of the rope end (see description) | * ropeStartDownVector: [[String]] or [[Array]], either a memory point [[String]] or relative vector [[Array]]. If [[String]] is given, then <tt>ropeStartDownVector</tt> is calculated from <tt>fromPoint</tt> towards <tt>ropeStartDownVector</tt> memory point | ||
* ropeEndDownVector: [[String]] or [[Array]], either a memory point [[String]] or relative vector [[Array]]. If [[String]] is given, then <tt>ropeEndDownVector</tt> is calculated from <tt>toPoint</tt> towards <tt>ropeEndDownVector</tt> memory point | |||
|p7= ropeEnd (Optional): [[Array]] - (Optional, default ["", [0,0,-1]]) array in format [ropeEndType, ropeEndDownVector] where: | |||
* ropeEndType: [[String]] - type of the rope end (see description) | |||
* ropeEndDownVector: [[String]] or [[Array]], either a memory point [[String]] or relative vector [[Array]]. If [[String]] is given, then <tt>ropeEndDownVector</tt> is calculated from <tt>toPoint</tt> towards <tt>ropeEndDownVector</tt> memory point | |||
|r1= [[Object]] - created rope or [[objNull]] on failure | |r1= [[Object]] - created rope or [[objNull]] on failure | ||
Line 75: | Line 91: | ||
|p21= fromObject: [[Object]] - [[ropeCreate/transport | transport]] where the rope originates and which fly behavior will be affected | |p21= fromObject: [[Object]] - [[ropeCreate/transport | transport]] where the rope originates and which fly behavior will be affected | ||
|p22= fromPoint: [[String]] or [[Array]] - position for the rope start, either a memory point [[String]] or relative offset [[Array]] | |p22= fromPoint: [[String]] or [[Array]] - position for the rope start, either a memory point [[String]] or relative offset [[Array]] | ||
|p23= length: [[Number]] - rope length in meters | |p23= length: [[Number]] - rope length in meters | ||
|p24= ropeStart | |||
* ropeStartType: [[String]] - type of the rope start (see description) | |p24= ropeStart: [[Array]] - (Optional, default ["", [0,0,-1]]) array in format [ropeStartType, ropeStartDownVector] where: | ||
* ropeStartDownVector: [[String]] or [[Array]], either a memory point [[String]] or relative vector [[Array]]. If [[String]] is given, then <tt>ropeStartDownVector</tt> is calculated from <tt>fromPoint</tt> towards <tt>ropeStartDownVector</tt> memory point | * ropeStartType: [[String]] - type of the rope start (see description) | ||
|p25= ropeEnd | * ropeStartDownVector: [[String]] or [[Array]], either a memory point [[String]] or relative vector [[Array]]. If [[String]] is given, then <tt>ropeStartDownVector</tt> is calculated from <tt>fromPoint</tt> towards <tt>ropeStartDownVector</tt> memory point | ||
* ropeEndType: [[String]] - type of the rope end (see description) | |||
* ropeEndDownVector: [[Array]] - relative vector | |p25= ropeEnd: [[Array]] - (Optional, default ["", [0,0,-1]]) array in format [ropeEndType, ropeEndDownVector] where: | ||
* ropeEndType: [[String]] - type of the rope end (see description) | |||
* ropeEndDownVector: [[Array]] - relative vector | |||
|r2= [[Object]] - created rope or [[objNull]] on failure | |r2= [[Object]] - created rope or [[objNull]] on failure | ||
|x1= <code>myRope = [[ropeCreate]] [<nowiki/>[[vehicle]] [[player]], "slingload0", myCargo, [0, 0, 0], 10];</code> | |x1= <code>myRope = [[ropeCreate]] [<nowiki/>[[vehicle]] [[player]], "slingload0", myCargo, [0, 0, 0], 10];</code> | ||
|x2= <code>myRope = [[ropeCreate]] [veh1, [0,0,-2], veh2, [0,0,0], 10];</code> | |x2= <code>myRope = [[ropeCreate]] [veh1, [0,0,-2], veh2, [0,0,0], 10];</code> | ||
|x3= Free end rope (Alt Syntax): <code>myRope = [[ropeCreate]] [<nowiki/>[[vehicle]] [[player]], [0,0,0], 10];</code> | |x3= Free end rope (Alt Syntax): <code>myRope = [[ropeCreate]] [<nowiki/>[[vehicle]] [[player]], [0,0,0], 10];</code> | ||
|x4= A rope with a hook on the end: <code>myRope = [[ropeCreate]] [heli, "slingload0", [[player]], [0,0,2], 20, [], ["RopeEnd", [0,0,-1]]];</code> | |x4= A rope with a hook on the end: <code>myRope = [[ropeCreate]] [heli, "slingload0", [[player]], [0,0,2], 20, [], ["RopeEnd", [0,0,-1]]];</code> | ||
|seealso= [[ropeDestroy]], [[ropeDetach]], [[ropes]], [[canSlingLoad]], [[enableRopeAttach]], [[getSlingLoad]], [[ropeAttachedObjects]], [[ropeAttachTo]], [[ropeLength]], [[ropeUnwound]], [[ropeAttachedTo]], [[ropeAttachEnabled]], [[ropeCut]], [[ropeEndPosition]], [[ropeUnwind]] | |seealso= [[ropeDestroy]], [[ropeDetach]], [[ropes]], [[canSlingLoad]], [[enableRopeAttach]], [[getSlingLoad]], [[ropeAttachedObjects]], [[ropeAttachTo]], [[ropeLength]], [[ropeUnwound]], [[ropeAttachedTo]], [[ropeAttachEnabled]], [[ropeCut]], [[ropeEndPosition]], [[ropeUnwind]] | ||
}} | }} | ||
}} | }} | ||
Line 102: | Line 126: | ||
<dd class="note"> | <dd class="note"> | ||
Doesn't work well for towing vehicles on the ground.<br> | Doesn't work well for towing vehicles on the ground.<br> | ||
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.<br> | 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.<br><br> | ||
<br> | |||
Also note that ropes can be destroyed/cut by shooting at them. | Also note that ropes can be destroyed/cut by shooting at them. | ||
</dd> | </dd> | ||
Line 111: | Line 134: | ||
<dt class="note">[[User:Feint|Feint]]</dt> | <dt class="note">[[User:Feint|Feint]]</dt> | ||
<dd class="note"> | <dd class="note"> | ||
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.<br> | 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.<br><br> | ||
<br> | |||
''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. | ''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. | ||
</dd> | </dd> | ||
</dl> | </dl> |
Revision as of 21:04, 21 August 2021
Take On Helicopters
Arma 3
Description
- Description:
- Creates a rope.
- Groups:
- Ropes and Sling Loading
Syntax
- Syntax:
- ropeCreate [fromObject, fromPoint, toObject, toPoint, segments, length]
- Parameters:
- fromObject: Object - object where rope starts and which fly behavior will be affected
- fromPoint: Array or String - specifies where on the object the rope should start, either a string (name of memory point) or an array of three numbers (vector in model coordinates).
- toObject: Object - object which is automatically attached to other side of rope (can be objNull, rope will stay with free end)
- toPoint: Array or String - specifies where on the object the rope should finish, either a string (name of memory point) or an array of three numbers (vector in model coordinates)
- segments: Number - define number of segments to be created
- length: Number - (Optional) rope length in meters
- Return Value:
- Object
Alternative Syntax
- Syntax:
- ropeCreate [fromObject, fromPoint, length, segments, unroll]
- Parameters:
- fromObject: Object - object where rope starts and which fly behavior will be affected
- fromPoint: Array or String - specifies where on the object the rope should start, either a string (name of memory point) or an array of three numbers (vector in model coordinates)
- length: Number - (Optional) rope length
- segments: Number - (Optional) define number of rope segments
- unroll: Boolean - (Optional) true if rope starts at one place and falls down unrolling itself, false to create it already in full length (default: false)
- Return Value:
- Object
Examples
- Example 1:
myRope = ropeCreate [vehicle player, "fastrope0", 10, 10, true];
Additional Information
- See also:
- ropeDestroyropeDetachropeSetCargoMass
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
Description
- Description:
- Creates a PhysX rope with given params.
- Groups:
- Ropes and Sling Loading
Syntax
- Syntax:
- ropeCreate [fromObject, fromPoint, toObject, toPoint, length, ropeStart, ropeEnd]
- Parameters:
- 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: Number - (Optional, default -1) rope length in meters
- ropeStart: Array - (Optional, default ["", [0,0,-1]]) array in format [ropeStartType, ropeStartDownVector] where:
- ropeEnd (Optional): Array - (Optional, default ["", [0,0,-1]]) array in format [ropeEndType, ropeEndDownVector] where:
- Return Value:
- Object - created rope or objNull on failure
Alternative Syntax
- Syntax:
- ropeCreate [fromObject, fromPoint, length, ropeStart, ropeEnd]
- Parameters:
- 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: Array - (Optional, default ["", [0,0,-1]]) array in format [ropeStartType, ropeStartDownVector] where:
- ropeEnd: Array - (Optional, default ["", [0,0,-1]]) 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:
- ropeDestroyropeDetachropescanSlingLoadenableRopeAttachgetSlingLoadropeAttachedObjectsropeAttachToropeLengthropeUnwoundropeAttachedToropeAttachEnabledropeCutropeEndPositionropeUnwind
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.
Categories:
- Scripting Commands
- Introduced with Take On Helicopters version 1.00
- Take On Helicopters: New Scripting Commands
- Take On Helicopters: Scripting Commands
- Command Group: Ropes and Sling Loading
- Introduced with Arma 3 version 1.34
- Arma 3: New Scripting Commands
- Arma 3: Scripting Commands
- Scripting Commands: Global Effect