moveInAny: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|x([0-9])= *<code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>")
(Use moveOut before moveIn)
Line 10: Line 10:
|gr1= Unit Control
|gr1= Unit Control


|descr= Moves unit to the first available seat in a vehicle.
|descr= Moves unit to the first available seat in the specified vehicle.
{{Feature|informative|See [[AI Group Vehicle Management]] for more information.}}


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.<br><br>
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.<br><br>
Seat assignment seems to use the following priority logic:<br>
Seat assignment seems to use the following priority logic:<br>
driver ([[moveInDriver]]) &rarr; commander ([[moveInCommander]]) &rarr; gunner ([[moveInGunner]]) &rarr; turrets ([[moveInTurret]]) &rarr; cargo ([[moveInCargo]]).
driver ([[moveInDriver]]) &rarr; commander ([[moveInCommander]]) &rarr; gunner ([[moveInGunner]]) &rarr; turrets ([[moveInTurret]]) &rarr; cargo ([[moveInCargo]]).
{{Feature|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.}}
{{Feature|informative|This command will move player into the [[locked]] vehicle or seat just as well.}}
{{Feature|informative|This command will move player into the [[locked]] vehicle or seat just as well.}}



Revision as of 18:50, 26 February 2023

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
vehicle: Object
Return Value:
Boolean - true on success, false on failure

Examples

Example 1:
player moveInAny tank;

Additional Information

See also:
moveInDriver moveInCommander moveInGunner moveInTurret moveInCargo

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