User Tools

Site Tools


arma3:scripting:support-module-supply-drop

ArmA 3 Support Module Supply Drop

ArmA 3 Forum, ArmA 3, ArmA 3 Config, ArmA 3 Missions, ArmA 3 3D Modeling, ArmA 3 Scripting, ArmA 3 Terrain, ArmA 3 Texturing, ArmA 3 Tools

2022-06-19T19:08:00Z

Place a crate down in 3Den and edit its contents to your liking, be it default or virtual.

Give the crate a name for instance 'myCrate'.

Set it as hidden by unticking showModel option in Object: Special States.

Place this in its init.

fnc_get3DENLoadout =
{
	params["_veh"];
 
	_virtualCargo =
	[
	        [_veh call BIS_fnc_getVirtualWeaponCargo, []],
	        [_veh call BIS_fnc_getVirtualMagazineCargo, []],
	        [_veh call BIS_fnc_getVirtualItemCargo, []],
	        [_veh call BIS_fnc_getVirtualBackpackCargo, []]
	];
 
	if (_virtualCargo findIf{count (_x select 0) > 0} > -1) then
	{
        	_veh setVariable ["loadout", [_virtualCargo, true]];
	}
	else
	{
        _veh setVariable["loadout",
	[
		[
                    getWeaponCargo _veh,
                    getMagazineCargo _veh,
                    getItemCargo _veh,
                    getBackpackCargo _veh
                ],
                false
            ]
        ];
    };
};
 
this call fnc_get3DENLoadout;

Then in the SupplyDrop modules crate init line place:

[_this, myCrate getvariable "loadout"] call BIS_fnc_initAmmobox;

Source bis forums Larrow 2016

arma3/scripting/support-module-supply-drop.txt · Last modified: 2024/07/25 07:15 by snakeman

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

All PMC web site download services are temporarily suspended until web site yearly fees have been recovered, want to download addons/mods? Then Support PMC.

If you are grateful for all the work PMC has done in the past 25 years, use Support PMC page.