From Bohemia Interactive Community
Revision as of 07:55, 21 July 2010 by Cobra4v320 (talk | contribs)
Jump to navigation Jump to search



Posted on August 3, 2006 - 14:30
Notes from before the conversion: If you run deleteVehicle for every playable soldier, the AI units will be removed. deleteVehicle unit1 will result in some very strange, and unwelcome, things happening. A safer way to delete unit1 if it is, or might be, inside a vehicle is: unassignVehicle unit1
unit1 setPos [0,0,0]
deleteVehicle unit1
This is because you cannot call deleteVehicle on a unit (soldier) who's currently inside a Vehicle. The line below works just fine for units that have been deleted. if (alive unit1) then {hint"He is alive"} else {hint"Oh no he's not"}
Posted on January 14, 2009 - 12:35
Units in vehicles cannot be deleted.
It doesn't matter whether it's the default crew (e.g. {driver car1}), or a unit that has been placed into a vehicle (e.g. {unit1 moveInCargo car1; deleteVehicle unit1}). In either case the unit will stay alive and visible in its position.
To circumvent this limitation, eject the unit first, before deleting it.
Posted on August 6, 2009 - 11:30
In Arma 2 deleting units in vehicles work. Trigger with the code below will remove APC, crew and the group that is moveincargo'd. {deletevehicle _x} foreach crew (thislist select 0); deletevehicle (thislist select 0);
Posted on April 6, 2010
Deleting a vehicle that has units in it can (but not always will) cause some weird bugs, for example "locking" the unit in freelook mode making it unable to turn or use the action menu, or leave "ghosts" of vehicle crew members if those were deleted after the vehicle deletion (deleting the crew before the vehicle works, as in the above example).
Posted on July 20, 2010
Here is a shorter and easier method of deleting a vehicle and its crew at the same time. You can place it into the vehicles ending waypoint or a trigger. {deleteVehicle _X} forEach (crew vehiclename)+[vehiclename]

Bottom Section