setTowParent: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Add getTowParent seealso link)
m (Some wiki formatting)
Line 5: Line 5:


|arg= global
|arg= global
 
|eff= global
|eff= local


|descr= {{{!}} class="wikitable float-right align-center align-left-col-1"
|descr= {{{!}} class="wikitable float-right align-center align-left-col-1"
Line 54: Line 53:


|mp= {{Feature|warning|
|mp= {{Feature|warning|
If a [[player]] enters the ''towingVehicle'' the ''towedVehicle'' will try to change locality to be local to that [[player]].<!--
If a [[player]] enters the towing vehicle, the towed one will try to change its locality to be local to that [[player]].<!--
--> This might be problematic if there is another [[player]] already in the ''towedVehicle''.<!--
--> This might be problematic if there is another [[player]] already in the towed vehicle.<!--
--> It is recommended to not have anyone in the ''towedVehicle''!
--> It is recommended to not have anyone in the towed vehicle!
}}
}}



Revision as of 12:12, 15 February 2023

Hover & click on the images for description

Description

Description:
Simulation CarX TankX AirplaneX BoatX
Towable Checked Unchecked Unchecked Unchecked
Can Tow Checked Checked Unchecked Unchecked

Allows a vehicle to be towed by another. This loosens the towed vehicle's brakes and turns its steering wheels toward the towing vehicle.

Supposed to be used together with a rope connecting both vehicles.
Multiplayer:
If a player enters the towing vehicle, the towed one will try to change its locality to be local to that player. This might be problematic if there is another player already in the towed vehicle. It is recommended to not have anyone in the towed vehicle!
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; // make sure everybody stays out of it ropeCreate [_bobcat, [0,-5,0], _towedVehicle, [0,2,0]]; _towedVehicle setTowParent _bobcat;

Additional Information

See also:
getTowParent 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