setTowParent: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Created page with "{{RV|type=command |game1= arma3dev |version1= 2.06 |arg= global |eff= local |descr= Allows ''towedVehicle'' to be towed by ''towingVehicle''. This loosens the vehicle bra...")
 
m (Some wiki formatting)
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{RV|type=command
{{RV|type=command


|game1= arma3dev
|game1= arma3
 
|version1= 2.06
|version1= 2.06


Line 12: Line 11:
Supposed to be used together with a rope connecting both vehicles.
Supposed to be used together with a rope connecting both vehicles.


|mp= {{Feature|warning|If a [[player]] enters the ''towingVehicle'' the ''towedVehicle'' will try to change locality to be local to the [[player]]. This might be problematic if there is a [[player]] already in the ''towedVehicle''. It is recommended to not have anyone in the ''towedVehicle''!}}
|mp= {{Feature|warning|
If a [[player]] enters the ''towingVehicle'' the ''towedVehicle'' will try to change locality to be local to the [[player]].
This might be problematic if there is a [[player]] already in the ''towedVehicle''.
It is recommended to not have anyone in the ''towedVehicle''!
}}


|gr1= Object Manipulation
|gr1= Object Manipulation
Line 26: Line 29:
|r1= [[Nothing]]
|r1= [[Nothing]]


|x1=  
|x1= <sqf>
 
{ moveOut _x } forEach crew _towedVehicle; // make sure nobody is in the towed vehicle
|x2=
_towedVehicle lock true;
ropeCreate [_bobcat, [0,-5,0], _towedVehicle, [0,2,0]];
_towedVehicle setTowParent _bobcat;
</sqf>


|seealso= [[ropeCreate]]
|seealso= [[ropeCreate]]
}}
}}

Revision as of 19:42, 5 May 2022

Hover & click on the images for description

Description

Description:
Allows towedVehicle to be towed by towingVehicle. This loosens the vehicle brakes of the towedVehicle and turned its steering wheels toward the towingVehicle. Supposed to be used together with a rope connecting both vehicles.
Multiplayer:
If a player enters the towingVehicle the towedVehicle will try to change locality to be local to the player.

This might be problematic if there is a player already in the towedVehicle.

It is recommended to not have anyone in the towedVehicle!
Groups:
Object ManipulationRopes and Sling Loading

Syntax

Syntax:
towedVehicle setTowParent towingVehicle
Parameters:
towedVehicle: Object - Vehicle of type CarX (No tanks, no aircrafts, no boats)
towingVehicle: Object - Vehicle of type CarX or TankX (No aircrafts, no boats)
Return Value:
Nothing

Examples

Example 1:
{ moveOut _x } forEach crew _towedVehicle; // make sure nobody is in the towed vehicle _towedVehicle lock true; ropeCreate [_bobcat, [0,-5,0], _towedVehicle, [0,2,0]]; _towedVehicle setTowParent _bobcat;

Additional Information

See also:
ropeCreate

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