{"name":"setTowParent","operator":null,"title":"setTowParent","type":"command","url":"https://community.bistudio.com/wiki/setTowParent","revid":373896,"updated":"2025-06-26T11:04:54Z","groups":["PhysX","Ropes and Sling Loading"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"2.06"}],"since":{"game":"arma3","name":"Arma 3","version":"2.06"},"arma3_since":"2.06","branch":null,"locality":{"argument":"local","effect":"global","server_exec":false},"exec":null,"description":"| Simulation | Towable | Can Tow |\n|---|---|---|\n| CarX | ✓ | ✓ |\n| TankX | ✗ | ✓ |\n| AirplaneX | ✗ | ✗ |\n| BoatX | ✗ | ✗ |\n\nAllows a vehicle to be towed by another. This loosens the towed vehicle's brakes and turns its steering wheels toward the towing vehicle.\nSupposed to be used together with a rope connecting both vehicles.","syntaxes":[{"syntax":"towedVehicle setTowParent towingVehicle","since":null,"effect":null,"exec":null,"params":[{"name":"towedVehicle","type":"Object","optional":false,"default":null,"description":"vehicle of type CarX (no tanks, no aircrafts, no boats)","types":["Object"],"since":null,"text":"towedVehicle: Object - vehicle of type CarX (no tanks, no aircrafts, no boats)"},{"name":"towingVehicle","type":"Object","optional":false,"default":null,"description":"vehicle of type CarX or TankX (no aircrafts, no boats)","types":["Object"],"since":null,"text":"towingVehicle: Object - vehicle of type CarX or TankX (no aircrafts, no boats)"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"towedVehicle","types":["Object"]},"right":{"text":"towingVehicle","types":["Object"]}}],"examples":[{"text":"```sqf\n{ moveOut _x } forEach crew _towedVehicle;    // make sure nobody is in the towed vehicle\n_towedVehicle lock true;                    // make sure everybody stays out of it\nropeCreate [_bobcat, [0,-5,0], _towedVehicle, [0,2,0]];\n_towedVehicle setTowParent _bobcat;\n```","code":["{ moveOut _x } forEach crew _towedVehicle;\t// make sure nobody is in the towed vehicle\n_towedVehicle lock true;\t\t\t\t\t// make sure everybody stays out of it\nropeCreate [_bobcat, [0,-5,0], _towedVehicle, [0,2,0]];\n_towedVehicle setTowParent _bobcat;"]}],"multiplayer":"> [!WARNING]\n> 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!","problems":null,"aliases":[],"see_also":["getTowParent","ropeCreate"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: PhysX","Command Group: Ropes and Sling Loading","Introduced with Arma 3 version 2.06","Scripting Commands","Scripting Commands: Global Effect"]}