deleteVehicleCrew: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Comments" to "|Comments=")
(Add objectParent information)
 
(50 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma3 |= Game name
|game1= arma3
|version1= 1.32


|1.32|= Game version
|arg= global


|arg= global |Multiplayer Arguments=
|eff= global
|eff= global |Multiplayer Effects=
____________________________________________________________________________________________


| Deletes a member of the crew of a vehicle. Human players cannot be deleted.<br><br>
|gr1= Object Manipulation
{{Informative | This command attempts to move the given [[crew]] member out before deleting it. Made especially for deleting dead crew members, as using conventional [[deleteVehicle]] leads to all sorts of bugs and ghost objects. While the argument is global, you should take extra steps and execute this where vehicle is [[local]] as moving units out of the vehicle happens where vehicle is [[local]] and you want this to always precede deletion. }} |DESCRIPTION=
____________________________________________________________________________________________


| vehicle '''deleteVehicleCrew''' unit |SYNTAX=
|descr= Deletes a member of or the whole crew of a vehicle. Human players cannot be deleted.
{{Feature|informative|This command attempts to move the given [[crew]] member out before deleting it. Made especially for deleting dead crew members, as using conventional [[deleteVehicle]] leads to all sorts of bugs and ghost objects. While the argument is global, you should take extra steps and execute this where vehicle is [[Multiplayer Scripting#Locality|local]] as moving units out of the vehicle happens where vehicle is [[Multiplayer Scripting#Locality|local]] and you want this to always precede deletion.}}


|p1= vehicle: [[Object]] |PARAMETER1=
|s1= vehicle [[deleteVehicleCrew]] unit
|p2= unit: [[Object]] |PARAMETER1=


| [[Nothing]] |RETURNVALUE=
|p1= vehicle: [[Object]]


|p2= unit: [[Object]]


|x1= <code>heli [[deleteVehicleCrew]] [[driver]] heli;</code>|EXAMPLE1=
|r1= [[Nothing]]


|s2= [[deleteVehicleCrew]] vehicle


____________________________________________________________________________________________
|s2since= arma3 2.06


| [[createVehicleCrew]], [[moveInDriver]], [[moveInGunner]], [[moveInCommander]], [[moveInTurret]], [[moveInCargo]], [[Arma_3:_Event_Handlers#Deleted | Deleted EH]] |SEEALSO=
|p21= vehicle: [[Object]]


| |MPBEHAVIOUR=  
|r2= [[Nothing]]
____________________________________________________________________________________________
}}


<h3 style='display:none'>Notes</h3>
|x1= <sqf>
<dl class='command_description'>
// delete when knowing the vehicle
<!-- Note Section BEGIN -->
_helicopter deleteVehicleCrew driver _helicopter;


<!-- Note Section END -->
// delete when only knowing the unit
</dl>
// vehicle _soldier deleteVehicleCrew _soldier; // may return the unit itself when used on dead crew
objectParent _soldier deleteVehicleCrew _soldier; // faster and always returns the vehicle
</sqf>


<h3 style='display:none'>Bottom Section</h3>
|x2= Delete entire crew:
[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]
<sqf>
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
deleteVehicleCrew _tank; // since v2.06
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Vehicle_Assignment|{{uc:{{PAGENAME}}}}]]


<!-- CONTINUE Notes -->
{ _helicopter deleteVehicleCrew _x } forEach crew _helicopter; // before v2.06
<dl class="command_description">
</sqf>
<dd class="notedate">Posted on August 31, 2014 - 10:15 (UTC)</dd>
<dt class="note">[[User:Killzone Kid|Killzone Kid]]</dt>
<dd class="note">
Not quite sure of the exact use of this command. You can delete AI pilot for example with <code>[[deleteVehicle]] [[driver]] heli;</code> but co-pilot will then jump out. If you use <code>heli [[deleteVehicleCrew]] [[driver]] heli;</code> co-pilot stays.  
</dd>
</dl>
<!-- DISCONTINUE Notes -->


<!-- CONTINUE Notes -->
|seealso= [[createVehicleCrew]] [[moveInDriver]] [[moveInGunner]] [[moveInCommander]] [[moveInTurret]] [[moveInCargo]] [[Arma_3:_Event_Handlers#Deleted | Deleted EH]]
<dl class="command_description">
}}
<dd class="notedate">Posted on April 10, 2015 - 13:43 (UTC)</dd>
<dt class="note">[[User:Tankbuster|Tankbuster]]</dt>
<dd class="note">
Using the following code will remove ALL crew from the given vehicle.


<code>{_myvehicle [[deleteVehicleCrew]] _x} [[forEach]] [[crew]] _myvehicle;</code>
{{Note
</dd>
|user= Killzone_Kid
</dl>
|timestamp= 20140831101500
<!-- DISCONTINUE Notes -->
|text= If you delete the AI pilot with <sqf inline>deleteVehicle driver heli</sqf> the co-pilot will jump out.<br>
If you delete the AI pilot with <sqf inline>heli deleteVehicleCrew driver heli</sqf> the co-pilot will stay.
}}

Latest revision as of 17:02, 18 September 2023

Hover & click on the images for description

Description

Description:
Deletes a member of or the whole crew of a vehicle. Human players cannot be deleted.
This command attempts to move the given crew member out before deleting it. Made especially for deleting dead crew members, as using conventional deleteVehicle leads to all sorts of bugs and ghost objects. While the argument is global, you should take extra steps and execute this where vehicle is local as moving units out of the vehicle happens where vehicle is local and you want this to always precede deletion.
Groups:
Object Manipulation

Syntax

Syntax:
vehicle deleteVehicleCrew unit
Parameters:
vehicle: Object
unit: Object
Return Value:
Nothing

Alternative Syntax

Syntax:
deleteVehicleCrew vehicle
Parameters:
vehicle: Object
Return Value:
Nothing

Examples

Example 1:
// delete when knowing the vehicle _helicopter deleteVehicleCrew driver _helicopter; // delete when only knowing the unit // vehicle _soldier deleteVehicleCrew _soldier; // may return the unit itself when used on dead crew objectParent _soldier deleteVehicleCrew _soldier; // faster and always returns the vehicle
Example 2:
Delete entire crew:
deleteVehicleCrew _tank; // since v2.06 { _helicopter deleteVehicleCrew _x } forEach crew _helicopter; // before v2.06

Additional Information

See also:
createVehicleCrew moveInDriver moveInGunner moveInCommander moveInTurret moveInCargo Deleted EH

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
Killzone_Kid - c
Posted on Aug 31, 2014 - 10:15 (UTC)
If you delete the AI pilot with deleteVehicle driver heli the co-pilot will jump out.
If you delete the AI pilot with heli deleteVehicleCrew driver heli the co-pilot will stay.