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

Introduced in



Description:Allows an administrator to manually set up a cargo space, in a vehicle that is not already configured.



[cv, cargoSpace, cargoProperties] call fn_vbs_unloadVehicleFromVehicleHold

  • cv: Object - Cargo vehicle to have the new cargo space.
  • cargoSpace: String - Cargo-space name.
  • cargoProperties: Array - Cargo-space properties. The values are: [spacePosition, alignmentMethod, objectSpacing, unloadingArea]
    • spacePosition: Array of Number - [[frontmost, leftmost, lowermost], [rearmost, rightmost, uppermost]], the positions in model space describing the frontmost, leftmost, and lowermost corner of the cargo-space cuboid, followed by the rearmost, rightmost, and uppermost corner of the cargo-space cuboid.
    • alignmentMethod: Array of String - Cargo alignment method, currently must always be ["front", "center"].
    • objectSpacing: Array of Number -  [left_right, forward_back, up_down], the amount of space (in meters) between cargo objects, when loaded (left-right, forward-back, and up-down).
    • unloadingArea: Array of Position - Data Type and Number - [unload_position, load_unload_radius], the position of the unloading area, where any unloaded vehicle is placed. The load_unload_radius is optional, and describes the radius of the user actions (load cargo / unload cargo). Without the optional parameter, no user actions are available.
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.


[c1, "NewCargo", [[-1.5, 1, 1.3], [1.5, -4, 4]], ["front", "center"], [0.1, 0.1, 0.1], [[0, -8, 0], 10]] call fn_vbs_SetupCargoAreaForVehicle

Additional Information

See also:fn_vbs_loadVehicleToVehicleHold, fn_vbs_unloadVehicleFromVehicleHold