deleteVehicle: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 14: Line 14:
____________________________________________________________________________________________
____________________________________________________________________________________________


| '''deleteVehicle''' object |= Syntax
| '''deleteVehicle''' [[Object]] |= Syntax


|p1= object: [[Object]] |= Parameter 1
|p1= [[Object]] |= Parameter 1


| [[Nothing]] |= Return value
| [[Nothing]] |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <pre>deleteVehicle tank1</pre>
|x1= <pre>deleteVehicle _house1</pre>


Attention Deleting a vehicle, which is still being accessed by a running script, can result in a CTD. |= Example 1
Attention Deleting a vehicle, which is still being accessed by a running script, can result in a CTD. |= Example 1

Revision as of 09:38, 27 August 2007

Hover & click on the images for description

Description

Description:
Delete an object. Note that only units inserted in the mission editor and units created during the game's progress can be deleted by this command. Island objects and player units can't be removed.
Groups:
Uncategorised

Syntax

Syntax:
deleteVehicle Object
Parameters:
Object
Return Value:
Nothing

Examples

Example 1:
deleteVehicle _house1
Attention Deleting a vehicle, which is still being accessed by a running script, can result in a CTD.

Additional Information

See also:
createUnitcreateUnit arraycreateVehicle arraycreateVehicleLocalcreateVehicle

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Posted on August 3, 2006 - 14:30
hardrock
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"}

Bottom Section