fn vbs moveIn (VBS2)
From Bohemia Interactive Community
| Editors, please check Policy: Scripting Command Page Syntax. |
Click on the images for descriptions
Introduced in
- Game:
- Virtual Battlespace 2
- Version:
- 1.20
Description
- Description:
- Moves a unit in a vehicle.
Syntax
- Syntax:
- [unit, vehicle, position, noAI, silent] call fn_vbs_moveIn
- Parameters:
- 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, cargo & hatches). If no position is given, the first empty seat following this priority list will be assumed ("driver" first, "cargo" last).
- noAI (optional): Boolean - True: only move in empty seats; False: Move in an AI seat if nothing else is free; if nothing is given, false is assumed.
- silent (optional, since 1.21): Number - 1: show no messages; 0: show messages when a problem occurs; if nothing is given, 0 is assumed.
- Return Value:
- Nothing
Examples
- Example 1:
[player, tank1] call fn_vbs_moveIn
Will move player into tank1, first free position after priority list is chosen.- Example 2:
[soldier2, tank4, true, 1] call fn_vbs_moveIn
Will move soldier2 into tank4, first free position after priority list is chosen, AI won't matter and there will be no messages (e.g. when there's no seat left).- Example 3:
[sol1, veh, "gunner", true] call fn_vbs_moveIn
Will move sol1 into veh as gunner. If there is alredy an AI, it will be thrown out or moved to cargo, if empty cargo is available.
Additional Information
- Multiplayer:
- Has global effect, the locality of the arguments does not matter (since 1.21).

