{"name":"unassignVehicle","title":"unassignVehicle","type":"command","url":"https://community.bistudio.com/wiki/unassignVehicle","revid":363373,"updated":"2024-03-28T19:52:42Z","groups":["Object Manipulation","Unit Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Unassigns individual unit from a vehicle, usually previously assigned with *assignAsXXX* command, i.e removes assignedVehicleRole of the unit.\nIf the unit is currently in that vehicle, the group leader will issue an order to disembark.\n\n> [!NOTE]\n> See AI Group Vehicle Management for more information.","syntaxes":[{"syntax":"unassignVehicle unitName","params":[{"name":"unitName","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unitName"}}],"examples":[{"code":["unassignVehicle player;"]},{"text":"Make all the occupants of a vehicle disembark:\n\n```sqf\n{ unassignVehicle _x } forEach crew _vehicle;\n```","code":["{ unassignVehicle _x } forEach crew _vehicle;"]},{"text":"Make all the occupants of a vehicle disembark and unable to get back in:\n\n```sqf\nprivate _crew = crew _vehicle;\n{ unassignVehicle _x } forEach _crew;\n_crew allowGetIn false;\n```","code":["private _crew = crew _vehicle;\n{ unassignVehicle _x } forEach _crew;\n_crew allowGetIn false;"]}],"see_also":["assignAsCargo","assignAsCommander","assignAsDriver","assignAsGunner","assignAsTurret","assignedVehicle","leaveVehicle","assignedVehicles","assignedGroup","fullCrew"]}