Jump to content
Sign in to follow this  
Harzach

[SOLVED] Export contents of virtual arsenal supply box

Recommended Posts

In the editor, one can create what is essentially a whitelisted virtual arsenal box. I use this often to limit what is available to players in certain missions, and it works perfectly. However, I would like to export the "contents" of this virtual box for reasons. After poring over the Biki for some time, I can't find any commands that appear to be relevant. Is this even possible?

Share this post


Link to post
Share on other sites

Classic me. 30 minutes later and I found what I was looking for :D

I always forget to look for functions!

  • Haha 1

Share this post


Link to post
Share on other sites

If anyone is at all curious, this is meant for use with ace_arsenal_fnc_initBox

 

Create a whitelisted arsenal box and name it "ammobox" (or whatever you want). Run this in the debug console:

_stuff = [];
_functions = [BIS_fnc_getVirtualBackpackCargo,BIS_fnc_getVirtualItemCargo,BIS_fnc_getVirtualMagazineCargo,BIS_fnc_getVirtualWeaponCargo];
{
    _things = ammobox call _x;
    _stuff = _stuff + _things;
} forEach _functions;
_init = format ["[this,%1] call ace_arsenal_fnc_initBox;",_stuff];
copyToClipboard _init;

Output is:

[this,[<array of whitelisted items>]] call ace_arsenal_fnc_initBox;

...which can be placed in the init of any object for use as an ACE arsenal.

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
Sign in to follow this  

×