deleteVehicle: Difference between revisions
Jump to navigation
Jump to search
m (moved notes) |
mNo edit summary |
||
Line 33: | Line 33: | ||
<dl class="command_description"> | <dl class="command_description"> | ||
<!-- Note Section BEGIN --> | <!-- Note Section BEGIN --> | ||
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 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"} | <dd class="notedate">Posted on August 3, 2006 - 14:30</dd> | ||
<dt class="note">'''[[User:Hardrock|hardrock]]'''</dt><dd class="note">''Notes from before the conversion:'' | |||
If you run deleteVehicle for every playable soldier, the AI units will be removed. | |||
<code>deleteVehicle unit1</code> | |||
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: | |||
<code>[[unassignVehicle]] unit1<br/> | |||
unit1 [[setPos]] [0,0,0]<br/> | |||
deleteVehicle unit1</code> | |||
The line below works just fine for units that have been deleted. | |||
<code>[[if]] ([[alive]] unit1) [[then]] {[[hint]]"He is alive"} [[else]] {[[hint]]"Oh no he's not"}</code> | |||
</dd> | |||
<!-- Note Section END --> | <!-- Note Section END --> | ||
</dl> | </dl> |
Revision as of 15:30, 3 August 2006
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
Examples
- Example 1:
deleteVehicle tank
Attention Deleting a vehicle, which is still being accessed by a running script, can cause in a CTD.
Additional Information
- See also:
- createVehiclecreateUnit
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
The line below works just fine for units that have been deleted.
unit1 setPos [0,0,0]
deleteVehicle unit1if (alive unit1) then {hint"He is alive"} else {hint"Oh no he's not"}