Arma 3 Scripting

moveInCargo

  • Local argument
  • Global effect
  • Arma 3 v0.50
  • First in Operation Flashpoint v1.00

Command · Markdown · JSON · original wiki page

Description

Moves a unit into a vehicle cargo position (immediately and without animation).

Note

See AI Group Vehicle Management for more information.

Important

If the unit is already in a vehicle, nothing will happen. You should use moveOut to move the unit out of his vehicle before trying to move him into a new (or same) vehicle.

Syntax

Syntax 1

unit moveInCargo vehicle

Parameters:

Returns: Nothing

Syntax 2

unit moveInCargo [vehicle, cargoIndex, canReassign]

Parameters:

Returns: Nothing

Examples

Example 1

_soldierOne moveInCargo _jeepOne;

Example 2

_soldierOne moveInCargo [_jeepOne, 1];

Multiplayer

Note

The command should execute where the unit (not vehicle) is local.

See also

moveInAny · moveInCommander · moveInDriver · moveInGunner · moveInTurret · assignAsCargo · assignAsCommander · assignAsDriver · assignAsGunner · getCargoIndex

Community notes

Hardrock

Notes from before the conversion

If you place a soldier in a vehicle with the moveInCargo command, he wont "know" he's in the vehicle, and thus he won't disembark properly when the vehicle reaches a Transport Unload waypoint. Therefore you have to use the assignAsCargo command, in order for the AI to catch on. Something like this:

_soldier moveInCargo helo1; _soldier assignAsCargo helo1;

Ceeeb

In OFP v1.96, the moveIn commands will not trigger an associated getIn event. To ensure the getIn event is fired, use the "getIn Cargo" action command.