addVehicle: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " \{\{GameCategory\|[a-z]+[0-9]?\|Scripting Commands\}\}" to "") |
Lou Montana (talk | contribs) m (Text replacement - "\|s1= +" to "|s1= ") |
||
Line 35: | Line 35: | ||
* To remove vehicle from a group, use [[leaveVehicle]]. | * To remove vehicle from a group, use [[leaveVehicle]]. | ||
|s1= | |s1= groupName '''addVehicle''' vehicleName | ||
|p1= groupName: [[Group]] | |p1= groupName: [[Group]] |
Revision as of 15:33, 19 June 2021
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.
- One can make an AI GL order his group to board the specified vehicle with orderGetIn true. Setting to false will cancel the order, but the AI will first enter to get out again immediately thereafter. To immediately (potentially temporarily) halt the AI moving to the vehicle one can use allowGetIn false.
- 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.
- Seems to have no affect on AI under player command - at least as long as the player remains the GL.
- To remove vehicle from a group, use leaveVehicle.
- 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
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
Categories:
- Scripting Commands
- Introduced with Armed Assault version 1.05
- ArmA: Armed Assault: New Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: Object Manipulation