Arma 3 Scripting

AI Group Vehicle Management

Topic · Markdown · JSON · original wiki page

Real Virtuality games' AI groups all work the same way with vehicles. Aside from game-specific commands, this page applies from Operation Flashpoint to Arma 3.

System

AI Decisions

Commands

Assign/MoveIn Commands (Unit specific)

Other Commands (Group specific)

Shared Commands


from assignedVehicle

from assignedVehicleRole

from unassignVehicle

  1. addVehicle creates a vehicle pool for the AI group to use.
  2. leaveVehicle removes a vehicle from the pool (and makes AI disembark when in that vehicle).
  3. However there is also assignedVehicle. This is about the current vehicle in use essentially. The assignment happens via the various assignAsXXX/moveInXXX commands, or player/AI GL getIn radio commands, getIn waypoint, or when units start in vehicles or get moved in to a vehicle by Zeus/via Eden.
  4. So the idea of unassignVehicle is to remove the current vehicle in use.
  5. However as long as the vehicle is still part of the vehicle pool of the group the AI GL may order the AI to re-enter the vehicle immediately.
  6. To stop this from happening, one can use orderGetIn/allowGetIn false to (temporarily) disallow the AI from entering any vehicle.

from orderGetIn

Dis/Embarking Behaviour

Courtesy of ffur2007slx2_5

Command Remote Control Behaviour Role Unassigning
orderGetIn ✗ orderGetIn won't take effect on player controlled AI units, and which needs to be used together with assaignAs command family. Generally speaking, orderGetIn is a Role Excuator. When orderGetIn was disabled it won't automatically unassign unit's vehicle role but will force the unit get out of the vehicle and stop him re-entering until it was enabled again. orderGetIn false won't stop a unit when he is embarking a vehicle in the half way but unassignVehicle will do. orderGetIn false will wait to fire until the unit enter a vehicle.
allowGetIn ✗ allowGetIn won't take effect on player controlled AI units. Different from orderGetIn, this command is a Role Holder, it can control the unit's movement in the half way set by orderGetIn but not by setWaypointType, unit will be forced to get out from a vehicle by allowGetIn false and won't automatically re-enter the vehicle until allowGetIn true allowGetIn won't do anything with unit's vehicle role
doGetOut ✓ Works on player controlled ai silently, unit will automatically get back to the vehicle after disembarkation. (Unit won't get out until vehicle is stopped or landed) false
commandGetOut ✓ Same as doGetOut with radio message. (Unit won't get out until vehicle is stopped or landed) false
leaveVehicle ✗ leaveVehicle can't force a player controlled AI disembark true
action ["GetOut", _veh] ✓ Eject immediately without parachute false
action ["Eject", _veh] ✓ Eject immediately with parachute if needed false
setWaypointType "GETIN" ✗ Waypoint won't be affected by orderGetIn false or allowGetIn false until the unit is on the vehicle. N/A