{"name":"unassignVehicle","operator":null,"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","replaced_by":[],"games":[{"game":"ofp","name":"Operation Flashpoint","version":"1.00"},{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"ofp","name":"Operation Flashpoint","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":"local","effect":"global","server_exec":false},"exec":null,"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","since":null,"effect":null,"exec":null,"params":[{"name":"unitName","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"unitName: Object"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"unary","operator":null,"left":null,"right":{"text":"unitName","types":["Object"]}}],"examples":[{"text":"```sqf\nunassignVehicle player;\n```","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;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["assignAsCargo","assignAsCommander","assignAsDriver","assignAsGunner","assignAsTurret","assignedVehicle","leaveVehicle","assignedVehicles","assignedGroup","fullCrew"],"notes":[],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Object Manipulation","Command Group: Unit Control","Introduced with Operation Flashpoint version 1.00","Operation Flashpoint: Elite: Scripting Commands","Operation Flashpoint: New Scripting Commands","Operation Flashpoint: Scripting Commands","Scripting Commands","Scripting Commands: Global Effect","Take On Helicopters: Scripting Commands"]}