{"name":"leaveVehicle","operator":null,"title":"leaveVehicle","type":"command","url":"https://community.bistudio.com/wiki/leaveVehicle","revid":347946,"updated":"2023-11-07T05:26:00Z","groups":["Unit Control","Groups"],"status":"ok","replaced_by":[],"games":[{"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":"arma2","name":"Arma 2","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":"local","effect":"local","server_exec":false},"exec":null,"description":"Ceases the using of the vehicle by a group and unassigns vehicle from the group.\nIf the argument is a single unit, the vehicle will be unassigned from unit's group.\nAfter vehicle is unassigned from the group, each individual crew member then unassigned from the vehicle.\n\nIn short the command could be hypothetically presented as:\n\n```sqf\nleaveVehicle = un-addVehicle + unassignVehicle forEach crew\n```\n\nHowever, to make it more reliable, it is best to move unit out of the vehicle manually with moveOut and force unassign the vehicle with unassignVehicle.\n\n> [!NOTE]\n> See AI Group Vehicle Management for more information.","syntaxes":[{"syntax":"group leaveVehicle vehicle","since":null,"effect":null,"exec":null,"params":[{"name":"group","type":"Group or Object","optional":false,"default":null,"description":"object's Group is used","types":["Group","Object"],"since":null,"text":"group: Group or Object - object's Group is used"},{"name":"vehicle","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"vehicle: Object"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"group","types":["Group","Object"]},"right":{"text":"vehicle","types":["Object"]}}],"examples":[{"text":"```sqf\n_unit leaveVehicle _vehicle;\n```","code":["_unit leaveVehicle _vehicle;"]},{"text":"```sqf\n_grp leaveVehicle _vehicle;\n```","code":["_grp leaveVehicle _vehicle;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["addVehicle","assignAsCargo","assignAsCommander","assignAsDriver","assignAsGunner","assignedVehicle","unassignVehicle","doGetOut","commandGetOut","createVehicleCrew","assignedVehicles","assignedGroup","fullCrew"],"notes":[{"user":"Killzone_Kid","date":"2013-08-31T16:08:00Z","text":"In Arma 3 this command will not force a player to exit from a vehicle. It will unassign vehicle role for this player. AI crew however will also disembark."}],"categories":["Arma 2: New Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Groups","Command Group: Unit Control","Introduced with Arma 2 version 1.00","Scripting Commands","Scripting Commands: Local Effect","Take On Helicopters: Scripting Commands"]}