{"name":"deleteVehicle","operator":null,"title":"deleteVehicle","type":"command","url":"https://community.bistudio.com/wiki/deleteVehicle","revid":352346,"updated":"2024-02-08T14:01:50Z","groups":["Object Manipulation"],"status":"ok","replaced_by":[],"games":[{"game":"ofp","name":"Operation Flashpoint","version":"1.34"},{"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.34"},"arma3_since":"0.50","branch":null,"locality":{"argument":"global","effect":"global","server_exec":false},"exec":null,"description":"Deletes an object. Only objects inserted in the mission editor and objects created during the game's progress can be deleted by this command. Terrain objects and players cannot be deleted.\n\n> [!NOTE]\n> The actual object deletion, when the object becomes objNull, happens on the next frame after command execution, but there are some object modifications that happen immediately. For example if the object is a unit in a group, it immediately becomes groupless (`isNull group _unit; // true`).","syntaxes":[{"syntax":"deleteVehicle object","since":null,"effect":null,"exec":null,"params":[{"name":"object","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"object: Object"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"unary","operator":null,"left":null,"right":{"text":"object","types":["Object"]}},{"syntax":"deleteVehicle objects","since":"arma3 2.18","effect":null,"exec":null,"params":[{"name":"objects","type":"Array of Objects","optional":false,"default":null,"description":null,"types":["Array","Object"],"since":null,"text":"objects: Array of Objects"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"unary","operator":null,"left":null,"right":{"text":"objects","types":["Array","Object"]}}],"examples":[{"text":"```sqf\ndeleteVehicle _house1;\n```","code":["deleteVehicle _house1;"]},{"text":"Deleting a vehicle with crew:\n\n```sqf\n// might want to make sure that the car is local\n{ car deleteVehicleCrew _x } forEach crew car;\ndeleteVehicle car;\n```","code":["// might want to make sure that the car is local\n{ car deleteVehicleCrew _x } forEach crew car;\ndeleteVehicle car;"]}],"multiplayer":null,"problems":"> [!WARNING]\n> Use deleteVehicleCrew to delete units that are in a vehicle! Do **not** use this command for a vehicle's crew members as it may lead to all sorts of bugs and ghost objects left on the map.","aliases":[],"see_also":["deleteVehicleCrew","createUnit","createVehicleLocal","createVehicle","Arma 3: Event Handlers"],"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","Introduced with Operation Flashpoint version 1.34","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"]}