ropeCreate: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(WIP)
No edit summary
Line 22: Line 22:
|p4= toObject: [[Object]] - object which is automatically attached to other side of rope (can be objNull, rope will stay with free end) |=  
|p4= toObject: [[Object]] - object which is automatically attached to other side of rope (can be objNull, rope will stay with free end) |=  
|p5= 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= 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) |=  
|p6= segments: [[Number]] - define number of segments to be created |=  
|p6= segments: [[Number]] - define number of segments to be created (not used in A3) |=  
|p7= length (Optional): [[Number]] - optional, rope length in meters |=  
|p7= length (Optional): [[Number]] - optional, rope length in meters |=  


Line 32: Line 32:
|p22= fromObject: [[Object]] - object where rope starts and which fly behavior will be affected |=
|p22= fromObject: [[Object]] - object where rope starts and which fly behavior will be affected |=
|p23= 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= 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) |=
|p24= length: [[Number]] - optional, rope length |=
|p24= length (Optional): [[Number]] - rope length |=
|p25= segments (Optional): [[Number]] - define number of rope segments |=
|p25= segments (Optional): [[Number]] - define number of rope segments (not used in A3)|=
|p26= unroll (Optional): [[Boolean]] - true if rope starts at one place and falls down unrolling itself, false to create it already in full length (default: false) |=
|p26= unroll (Optional): [[Boolean]] - true if rope starts at one place and falls down unrolling itself, false to create it already in full length (default: false) (not used in A3) |=


|r2= [[Object]] |= Return value 2
|r2= [[Object]] |= Return value 2
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1 = <code>myRope = [[ropeCreate]] <nowiki>[</nowiki>[[vehicle]] [[player]], "slingload0", myCargo, [0, 0, 0], 10];</code> |= Example 1
|x1 = <code>myRope = [[ropeCreate]] <nowiki>[</nowiki>[[vehicle]] [[player]], "slingload0", myCargo, [0, 0, 0], 10]; //A3 example</code> |= Example 1
|x2 = <code>myRope = [[ropeCreate]] <nowiki>[</nowiki>[[vehicle]] [[player]], "fastrope0", 10, 10, [[true]]<nowiki>]</nowiki>;</code> |= Example 2
|x2 = <code>myRope = [[ropeCreate]] <nowiki>[</nowiki>[[vehicle]] [[player]], "fastrope0", 10, 10, [[true]]<nowiki>]</nowiki>; //TakeOn example</code> |= Example 2
|x3 = <code>myRope = [[ropeCreate]] [veh1, [0,0,-2], veh2, [0,0,0], 10]//A3 1.34</code> |= Example 3
|x3 = <code>myRope = [[ropeCreate]] [veh1, [0,0,-2], veh2, [0,0,0], 10] //A3 1.34</code> |= Example 3


| [[ropeDestroy]], [[ropeDetach]], [[ropeSetCargoMass]], [[ropes]], [[canSlingLoad]], [[enableRopeAttach]], [[getSlingLoad]], [[ropeAttachedObjects]], [[ropeAttachTo]], [[ropeLength]], [[ropeUnwound]], [[ropeAttachedTo]], [[ropeAttachEnabled]], [[ropeCut]], [[ropeEndPosition]], [[ropeUnwind]] |= See also
| [[ropeDestroy]], [[ropeDetach]], [[ropeSetCargoMass]], [[ropes]], [[canSlingLoad]], [[enableRopeAttach]], [[getSlingLoad]], [[ropeAttachedObjects]], [[ropeAttachTo]], [[ropeLength]], [[ropeUnwound]], [[ropeAttachedTo]], [[ropeAttachEnabled]], [[ropeCut]], [[ropeEndPosition]], [[ropeUnwind]] |= See also
Line 69: Line 69:
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>
</dl>
<!-- DISCONTINUE Notes -->


<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on January 4, 2015 - 03:24 (UTC)</dd>
<dd class="notedate">Posted on January 4, 2015 - 03:24 (UTC)</dd>
<dt class="note">[[User:Feint|Feint]]</dt>
<dt class="note">[[User:Feint|Feint]]</dt>
Line 80: Line 76:
<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 class="notedate">Posted on July 9, 2015</dd>
<dt class="note">[[User:Druid|Druid]]</dt>
<dd class="note">
Parameters ''segments'' and ''unroll'' are not supported in Arma 3. Segments are set automatically according the length of a rope.
</dd>
</dd>
</dl>
</dl>
<!-- DISCONTINUE Notes -->
<!-- DISCONTINUE Notes -->

Revision as of 14:21, 9 July 2015


Hover & click on the images for description

Description

Description:
Create a rope (PhysX rope in Arma 3).
Groups:
Uncategorised

Syntax

Syntax:
ropeCreate [fromObject, fromPoint, toObject, toPoint, segments, length]
Parameters:
[fromObject, fromPoint, toObject, toPoint, segments, length]: Array
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 (not used in A3)
length (Optional): Number - optional, rope length in meters
Return Value:
Object

Alternative Syntax

Syntax:
ropeCreate [fromObject, fromPoint, length, segments, unroll]
Parameters:
[fromObject, fromPoint, lenght, segments, unroll]: Array
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 (Optional): Number - rope length
segments (Optional): Number - define number of rope segments (not used in A3)
unroll (Optional): Boolean - true if rope starts at one place and falls down unrolling itself, false to create it already in full length (default: false) (not used in A3)
Return Value:
Object

Examples

Example 1:
myRope = ropeCreate [vehicle player, "slingload0", myCargo, [0, 0, 0], 10]; //A3 example
Example 2:
myRope = ropeCreate [vehicle player, "fastrope0", 10, 10, true]; //TakeOn example
Example 3:
myRope = ropeCreate [veh1, [0,0,-2], veh2, [0,0,0], 10] //A3 1.34

Additional Information

See also:
ropeDestroyropeDetachropeSetCargoMassropescanSlingLoadenableRopeAttachgetSlingLoadropeAttachedObjectsropeAttachToropeLengthropeUnwoundropeAttachedToropeAttachEnabledropeCutropeEndPositionropeUnwind

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

Notes

Bottom Section

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.
Posted on July 9, 2015
Druid
Parameters segments and unroll are not supported in Arma 3. Segments are set automatically according the length of a rope.