addVehicle: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Bot: Replacing category Scripting Commands Arma 3 with Arma 3: Scripting Commands)
No edit summary
 
(50 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma |= Game name
|game1= arma1
|version1= 1.05


|1.05|= Game version
|game2= arma2
|version2= 1.00


|arg= local |= Arguments in MP
|game3= arma2oa
____________________________________________________________________________________________
|version3= 1.50


| 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.
|game4= tkoh
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
|version4= 1.00
____________________________________________________________________________________________


| groupName '''addVehicle''' vehicleName|= Syntax
|game5= arma3
|version5= 0.50


|p1= groupName: [[Group]]|= Parameter 1
|arg= local


|p2= vehicleName: [[Object]]|= Parameter 2
|gr1= Object Manipulation


| [[Nothing]] |= Return value
|descr= Adds a specified vehicle for use by a specified AI led group.
____________________________________________________________________________________________
{{Feature|informative|See [[AI Group Vehicle Management]] for more information.}}
 
|x1= <code>_grp [[addVehicle]] _vehicle</code> |= Example 1


|x2= Using on crewed vehicle:<code>[[group]] tank [[addVehicle]] tank;</code> |= Example 2
|s1= groupName [[addVehicle]] vehicleName
____________________________________________________________________________________________


| [[leaveVehicle]], [[unassignVehicle]], [[createVehicleCrew]] |= See also
|p1= groupName: [[Group]]


}}
|p2= vehicleName: [[Object]]


<h3 style="display:none">Notes</h3>
|r1= [[Nothing]]
<dl class="command_description">


<!-- Note Section BEGIN -->
|x1= <sqf>_grp addVehicle _vehicle;</sqf>
<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 -->
</dl>


<h3 style="display:none">Bottom Section</h3>
|x2= Using on crewed vehicle:
<sqf>group tank addVehicle tank;</sqf>


[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
|seealso= [[leaveVehicle]] [[unassignVehicle]] [[createVehicleCrew]] [[assignedVehicles]] [[assignedGroup]] [[fullCrew]]
[[Category:Scripting Commands ArmA|{{uc:{{PAGENAME}}}}]]
}}
[[Category:Command Group: Object Manipulation|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Arma 3: Scripting Commands]]
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]

Latest revision as of 16:18, 31 August 2022

Hover & click on the images for description

Description

Description:
Adds a specified vehicle for use by a specified AI led group.
See AI Group Vehicle Management for more information.
Groups:
Object Manipulation

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:
leaveVehicle unassignVehicle createVehicleCrew assignedVehicles assignedGroup fullCrew

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