Page tree
Skip to end of metadata
Go to start of metadata

Introduced in



Description:Moves a unit in a vehicle.


Syntax:[unit, vehicle, position, noAI, silent] call fn_vbs_moveIn
  • unit: Object - The unit which gets in.
  • vehicle: Object - The vehicle to move in.
  • position (optional): String - The position to move in, one of "driver", "gunner", "commander", "cargohatch" (only hatches), "cargo" (copilot, carg, and hatches). If no position is provided, the first empty seat following this priority list ("driver" first, "cargo" last) is assumed.
  • noAI (optional): Boolean - If true, only move to empty seats; if false, move to an AI seat, if nothing else is free (default: false).
  • silent (optional, V1.21+): Number - If 1, show no messages; if 0, show messages when a problem occurs (default: 0).
Return Value:Nothing


When using functions in VBS versions older than 3.4, certain limitations and requirements should be kept in mind - the main ones being that capitalization of the function name is crucial, and that #include "\vbs2\headers\function_library.hpp" has to be included in every script that utilizes it. More Category VBS Scripting Functions.


[player, tank1] call fn_vbs_moveIn
// Move player into tank1, first free position after priority list is chosen.
[soldier2, tank4, true, 1] call fn_vbs_moveIn
// Move soldier2 into tank4, first free position after priority list is chosen, AI does not matter and there are no messages (for example, when there is no seat left).
[sol1, veh, "gunner", true] call fn_vbs_moveIn
// Move sol1 into veh as gunner. If there is already an AI unit in place, it is thrown out or moved to cargo, if empty cargo is available.

Additional Information

See also: fn vbs putUnitsInVehicle, fn vbs fillCrewPositions, fn vbs createVehicle
Multiplayer:Has global effect, the locality of the arguments does not matter (V1.21+).