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...")
 
mNo edit summary
Line 26: Line 26:
|r1= [[Nothing]]
|r1= [[Nothing]]


|x1=  
|x1= <code>_towedVehicle [[apply]] { [[moveOut]] [[_x]] }; {{cc|Make sure no player or AI is in the vehicle}}
_towedVehicle [[lock]] [[true]];
_hemmt '''setTowParent''' _bobcat; {{cc|Set tow Parent}}
Example needs to be expanded with ropeCreate and ropeAttachTo later</code>


|x2=
|x2=

Revision as of 17:14, 18 May 2021

-wrong parameter ("arma3dev") defined!-[[:Category:Introduced with arma3dev version 2.06|2.06]]
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:
_towedVehicle apply { moveOut _x }; // Make sure no player or AI is in the vehicle _towedVehicle lock true; _hemmt setTowParent _bobcat; // Set tow Parent Example needs to be expanded with ropeCreate and ropeAttachTo later

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

[[Category:Introduced with arma3dev version 2.06]][[ Category: arma3dev: New Scripting Commands | SETTOWPARENT]][[ Category: arma3dev: Scripting Commands | SETTOWPARENT]]