@T_STRONG_SHARK
This is what i did for my own mission:
- Name your objects/crates etc and add them in the array _crates.
- Put the script in a .sqf file and execute it from your initPlayerLocal
- You do not have to add anything else in your object init.
_crates = [crate1,crate2,etc];
//Lists of items to include
_nvgoggles = [
"rhsusf_ANPVS_14",
"rhsusf_ANPVS_15"
_availableHeadgear = [
"rhsusf_lwh_helmet_marpatd",
"rhsusf_lwh_helmet_marpatd_ess",
"rhsusf_lwh_helmet_marpatd_headset",
"rhs_8point_marpatd"
];
_availableGoggles = [
"rhsusf_googles_black",
"rhsusf_googles_yellow",
"rhsusf_googles_orange",
"rhsusf_googles_clear",
"rhsusf_shemagh_tan",
"rhsusf_shemagh2_tan",
"rhsusf_shemagh_gogg_tan",
"rhsusf_shemagh2_gogg_tan",
"G_Aviator"
];
_availableUniforms = [
"rhs_uniform_FROG01_d1"
];
_availableVests = [
"rhsusf_spc",
"rhsusf_spc_corpsman",
"rhsusf_spc"_crewman,
"rhsusf_spc_iar",
"rhsusf_spc_light",
"rhsusf_spc_mg",
"rhsusf_spc_marksman",
"rhsusf_spc_patchless",
"rhsusf_spc_patchless_radio",
"rhsusf_spc_rifleman",
"rhsusf_spc_squadleader",
"rhsusf_spc_teamleader"
];
_availableBackpacks = [
"B_Kitbag_cbr",
"B_Parachute",
"rhsusf_assault_eagleaiii_coy"
];
//Populate with predefined items and whatever is already in the crate
{
[_x,((backpackCargo _crate) + _availableBackpacks)] call BIS_fnc_addVirtualBackpackCargo;
[_x,((itemCargo _crate) + _availableHeadgear + _availableGoggles + _availableUniforms + _availableVests)] call BIS_fnc_addVirtualItemCargo;
[_x,(magazineCargo _crate)] call BIS_fnc_addVirtualMagazineCargo;
[_x,(weaponCargo _crate)] call BIS_fnc_addVirtualWeaponCargo;
} forEach _crates;