setTowParent
- Local argument
- Global effect
- Arma 3 v2.06
Command · also in Ropes and Sling Loading · Markdown · JSON · original wiki page
Description
| Simulation | Towable | Can Tow |
|---|---|---|
| CarX | ✓ | ✓ |
| TankX | ✗ | ✓ |
| AirplaneX | ✗ | ✗ |
| BoatX | ✗ | ✗ |
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.
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)
Returns: 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;
Multiplayer
Warning
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!