moveInAny

From Bohemia Interactive Community
Hover & click on the images for description

Description

Description:
Moves unit to the first available seat in the specified vehicle. The order of priorities is the same order used in squad command when you order subordinates to get in vehicle to any position and is the same order used in Zeus when you drag units to a vehicle.

Seat assignment seems to use the following priority logic:
driver (moveInDriver) → commander (moveInCommander) → gunner (moveInGunner) → turrets (moveInTurret) → cargo (moveInCargo).
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.
This command will move player into the locked vehicle or seat just as well.
Groups:
Unit Control

Syntax

Syntax:
unit moveInAny vehicle
Parameters:
unit: Object - person
vehicle: Object - transport
Return Value:
Boolean - true on success, false on failure

Alternative Syntax

Syntax:
unit moveInAny [vehicle, positions, ignoreLocked]
Parameters:
vehicle: Object - transport
positions: Array - Array of positions to check and in which order. Positions are (in default order):
  • "DRIVER" - driver
  • "COMMANDER" - commander turret (turret configured as commander)
  • "GUNNER" - gunner turret (turret configured as gunner)
  • "TURRET" - other turrets incl. FFV but excl. gunner or commander turret
  • "CARGO" - cargo seats excl. FFV
When empty array [] is given, all positions in default order (same as in the main syntax) will be considered. See also: emptyPositions
ignoreLocked (Optional): Boolean - true to ignore locked positions. Default: false
Return Value:
Boolean - true on success, false on failure

Examples

Example 1:
player moveInAny tank;
Example 2:
player moveInAny [tank, ["CARGO", "TURRET"]]; // checks free cargo position, if not available, checks free turret next

Additional Information

See also:
moveInDriver moveInCommander moveInGunner moveInTurret moveInCargo emptyPositions

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord.
Only post proven facts here! Add Note