genesis92x 810 Posted August 17, 2019 Gen_VirtualCargo 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. It also allows for dynamic placement of objects into the world. Features - 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 Bugs 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 { [ [CargoVehicle1], { 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! https://www.dropbox.com/s/vywsoaixcr4ihyo/Gen_VirtualCargo.7z?dl=0 1 3 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted August 17, 2019 Thank you very much for sharing this genesis92x ! Great work as always ! 1 Share this post Link to post Share on other sites
fawlty 27 Posted August 21, 2019 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
z80cpu 37 Posted August 25, 2019 @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... ;) 2 Share this post Link to post Share on other sites
fawlty 27 Posted August 25, 2019 Thanks Ended up subscribing to boxloader (steam workshop), does what I need Share this post Link to post Share on other sites