Jump to content

[Release] Gen_VirtualCargo - Virtual Cargo for vehicles!

Recommended Posts



Hey all, I made this simple function in about ~2 hours for a mission of mine and thought the community as a whole might get some use out of it.


It is a lightweight, mod compatible, easy-to-use, virtual cargo system that allows vehicles to "carry" objects/other vehicles around and deploy them dynamically across the battlefield. Including ammo crates and etc.


The function pulls how much each vehicle can hold from it's config.


A simple but intuitive UI. 

View of UI


It also allows for dynamic placement of objects into the world.






- Store objects into vehicles

- Deploy objects from vehicles using a line-of-sight system

- Prevents using objects to "punt" or destroy other objects (restrictive placement system)

- Light weight

- Easy to mod

- Supports modded vehicles

- Keeps inventories and damage states of transported objects.

- avoids using attachto due to FPS hit by attachto



I made it in ~2 hours, there will be a few bugs.


How to use?

Usage is fairly simple. Download the folder below, and copy the description.ext into your mission and the folder Gen_VirtualCargo.


Place this code in the init for any vehicle you wish to be affected by this script.

if (isServer) then
			if !(hasInterface) exitWith {};
			params ["_Veh"];
			_Veh addAction ["Cargo Access", {params ["_target", "_caller", "_actionId", "_arguments"];[_target] spawn GEN_fnc_VirtualCargo;},[],0.5,false,true,"(alive _target)"];
	] remoteExecCall ["BIS_fnc_call",0,CargoVehicle1];	


Have fun!





  • Like 1
  • Thanks 3

Share this post

Link to post
Share on other sites

Gen for the life of me I can't get this to work.


I placed the above code into the init.sqf,


added this code to the description.ext

class CfgRemoteExec
    // List of script functions allowed to be sent from client via remoteExec
    class Functions
        mode = 2;
        jip = 1;        

        class enableSimulationGlobal { allowedTargets = 0;jip = 1; };
        class allowdamage { allowedTargets = 0;jip = 1; };
        class hideobjectglobal { allowedTargets = 0;jip = 1; };
        class BIS_fnc_call { allowedTargets = 0;jip = 1; };

class CfgFunctions 
    #include "Gen_VirtualCargo\cfgFunctions.hpp"


Went to a VR map added a transport truck named it CargoVehicle1

went into the game via play in multiplayer.

 I can load cargo but can't unload.


I can see some fun missions built around this

Any Suggestions?



Share this post

Link to post
Share on other sites

@fawlty -


You:  "...I placed the above code into the init.sqf..."


I think he might have meant into the INIT OF THE VEHICLE.  That probably will make it work...because of what he said "...Place this code in the init.sqf for any vehicle you wish to be affected by this script...".


Where you put it would be for EVERY vehicle, he stated for those you wish to be 'affected' which would be the vehicles init.


Me thinks a typo...





  • Thanks 2

Share this post

Link to post
Share on other sites


Ended up subscribing to boxloader (steam workshop), does what I need

Share this post

Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now