addVehicle: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "[[Category:Scripting Commands ArmA|" to "[[Category:Scripting Commands Armed Assault|")
(improved description and examples)
Line 9: Line 9:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Adds a specified vehicle for use by a specified AI led group taking into account vehicle's cost. The vehicle will be considered as an available vehicle for use by this group.  
| Adds a specified vehicle for use by a specified AI led group.
When vehicle is added in this way, it can appear as a target for the enemy even if the vehicle is currently free of the crew. Vehicles with crew, which are placed in the editor, get automatically added to the group. To remove vehicle from a group, use [[leaveVehicle]]. |DESCRIPTION=
<br><br>
Notes:
* The vehicle will be considered as available for use by this group.  
* It creates a/adds to the vehicle pool for the given group to use. So more than one vehicle can be added to a group, and more than one group can be added to a vehicle.
* This is relevant for some waypoints like getIn and guard - potentially more.
* The AI choosing what vehicle to use based on the vehicle's [[CfgVehicles_Config_Reference#cost|cost]] value. Probably also distance to the available vehicles plays a role.
* When deciding whether to board a vehicle, AI leaders seem to only consider the transport benefit of a vehicle, ignoring any combat benefits the vehicle may provide.
* This happens also implicitly when using assignAsXXX or moveInXXX commands, or player GL orders units to enter a vehicle, as well editor or Zeus placed vehicles with units assigned to it.
* When vehicle is added in this way, it can appear as a target for the enemy - even if the vehicle currently has no crew.
* If used on a vehicle already driven by a member of another group, the driver will continue under his own group's orders, which may not benefit the addVehicle group.
* To remove vehicle from a group, use [[leaveVehicle]].
|DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


Line 33: Line 44:
<h3 style="display:none">Notes</h3>
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section BEGIN -->
<dd class="notedate">Posted on 22 Nov, 2008 00:40
<dt class="note">[[User:Ceeeb|Ceeeb]]<dd class="note">
* This command works best when used on empty vehicles. If used on a vehicle already driven by a member of another group, the driver will continue under his own group's orders, which may not benefit the addVehicle group.<br>
* More than one vehicle can be added to a group, and more than one group can be added to a vehicle.<br>
* When deciding whether to board a vehicle, AI leaders seem to only consider the transport benefit of a vehicle, ignoring any combat benefits the vehicle may provide.
<!-- Note Section END -->
<!-- Note Section END -->
</dl>
</dl>

Revision as of 09:27, 8 August 2020

-wrong parameter ("Arma") defined!-1.05
Hover & click on the images for description

Description

Description:
Adds a specified vehicle for use by a specified AI led group.

Notes:
  • The vehicle will be considered as available for use by this group.
  • It creates a/adds to the vehicle pool for the given group to use. So more than one vehicle can be added to a group, and more than one group can be added to a vehicle.
  • This is relevant for some waypoints like getIn and guard - potentially more.
  • The AI choosing what vehicle to use based on the vehicle's cost value. Probably also distance to the available vehicles plays a role.
  • When deciding whether to board a vehicle, AI leaders seem to only consider the transport benefit of a vehicle, ignoring any combat benefits the vehicle may provide.
  • This happens also implicitly when using assignAsXXX or moveInXXX commands, or player GL orders units to enter a vehicle, as well editor or Zeus placed vehicles with units assigned to it.
  • When vehicle is added in this way, it can appear as a target for the enemy - even if the vehicle currently has no crew.
  • If used on a vehicle already driven by a member of another group, the driver will continue under his own group's orders, which may not benefit the addVehicle group.
  • To remove vehicle from a group, use leaveVehicle.
Groups:
Uncategorised

Syntax

Syntax:
groupName addVehicle vehicleName
Parameters:
groupName: Group
vehicleName: Object
Return Value:
Nothing

Examples

Example 1:
_grp addVehicle _vehicle
Example 2:
Using on crewed vehicle:group tank addVehicle tank;

Additional Information

See also:
leaveVehicleunassignVehiclecreateVehicleCrew

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

Bottom Section