Jump to content

Recommended Posts

Good morning guys (or good afternoon or good night)!

 

I'm trying to create my first mission using scripts to spawn enemies, but I would like to make them spawn with random weapons and equipment. I looked in a few places for some references I could use and came up with this script I'm working on.
However, I am having two problems with the script.
The first is that enemies are spawning with the same weapons instead of random weapons.
The second is that when they spawn they don't have ammo.
Can anyone tell me what I'm doing wrong in the script and how can I fix it?
Here's the script I'm using:

private ["_group1","_spawnTes4","_weaponPrimary","_weaponSecondary","_magazinePrimary","_magazineSecondary"];

// Group 1

_group1 = ["CUP_O_RU_Soldier_TL_M_EMR","CUP_O_RU_Soldier_M_EMR","CUP_O_RU_Soldier_M_EMR","CUP_O_RU_Crew_M_EMR","CUP_O_RU_Medic_M_EMR","CUP_O_RU_Soldier_AR_M_EMR","CUP_O_RU_Soldier_Marksman_M_EMR"];

_spawnTes4 = "spawn4";

_group1 = [getMarkerPos _spawnTes4, EAST, _group1] call BIS_fnc_spawnGroup;

[_group1, getMarkerpos "spawn3"] call BIS_fnc_taskDefend;

_group1 setBehaviour (["STEALTH","SAFE"] call BIS_fnc_selectRandom);

// Skill

{
    _x setSkill ["spotDistance",0.8];
    _x setSkill ["aimingShake",0.6];
    _x setSkill ["spotTime",0.65];
} forEach (units _group1);
_group1 allowFleeing 0;

// Loadout

_weaponPrimary = selectRandom [
    "arifle_MX_F",
    "arifle_Katiba_F",
    "srifle_DMR_01_F",
    "SMG_01_F",
    "arifle_MX_khk_F",
    "arifle_AK12_F",
    "arifle_AKM_F",
    "srifle_DMR_07_blk_F",
    "LMG_Mk200_F",
    "LMG_Zafir_F"
]; 

_weaponSecondary = selectRandom  [
    "hgun_Rook40_F",
    "hgun_ACPC2_snds_F",
    "hgun_PDW2000_F",
    "hgun_P07_khk_F"
]; 

_magazinePrimary = getArray (configFile >> "CfgWeapons" >> _weaponPrimary >> "magazines");
_magazineSecondary = getArray (configFile >> "CfgWeapons" >> _weaponSecondary >> "magazines");

{
    removeAllWeapons _x;
    removeAllItems _x;
    removeAllAssignedItems _x;
    removeUniform _x;
    removeVest _x;
    removeBackpack _x;
    removeHeadgear _x;
    removeGoggles _x;
    _x removeItem "NVGoggles";
    _x unassignItem "NVGoggles";

    _x addWeapon _weaponPrimary;
    _x addPrimaryWeaponItem (selectRandom ["","","optic_Yorris","optic_MRD","CUP_optic_Kobra","optic_Aco","optic_ACO_grn","optic_Aco_smg","optic_ACO_grn_smg","CUP_optic_SB_11_4x20_PM","optic_Holosight","optic_Holosight_smg","optic_Arco","optic_Hamr","optic_Arco_AK_blk_F","optic_Arco_blk_F","optic_ERCO_blk_F","optic_MRCO","CUP_optic_PechenegScope","CUP_optic_PSO_1","CUP_optic_PSO_1_AK","optic_DMS","optic_SOS","CUP_optic_LeupoldMk4","optic_AMS","optic_KHS_blk","CUP_optic_PSO_1_1","CUP_optic_PSO_3"]);
    _x addPrimaryWeaponItem (selectRandom ["","","acc_flashlight","acc_flashlight_smg_01","acc_flashlight_pistol","CUP_acc_ANPEQ_15_Black","acc_pointer_IR","muzzle_snds_L","CUP_muzzle_snds_MicroUzi","muzzle_snds_M","CUP_muzzle_snds_KZRZP_AK545","muzzle_snds_H","CUP_muzzle_snds_KZRZP_AK762","muzzle_snds_B","CUP_muzzle_snds_KZRZP_SVD","CUP_muzzle_snds_SCAR_H","muzzle_snds_338_black","CUP_muzzle_snds_AWM","bipod_01_F_blk","bipod_02_F_blk","bipod_03_F_blk","bipod_02_F_lush","CUP_optic_ekp_8_02"]);
    //_x enableGunLights "forceOn";
    _x addWeapon _weaponSecondary;

    _x forceAddUniform (selectRandom ["U_O_R_Gorka_01_camo_F","U_O_R_Gorka_01_black_F","U_O_R_Gorka_01_brown_F","U_O_R_Gorka_01_camo_F"]);
    //for "_i" from 1 to 4 do {_x addItemToUniform _magazinePrimary};
    //for "_i" from 1 to 4 do {_x addItemToUniform _magazineSecondary};
    _x addVest (selectRandom ["","V_Rangemaster_belt","V_BandollierB_blk","V_HarnessOSpec_gry","V_TacVest_blk_POLICE","V_Press_F","V_PlateCarrierIA1_dgtl","V_PlateCarrier1_rgr","V_PlateCarrier2_blk","V_SmershVest_01_F","V_Chestrig_khk","V_TacVest_oli","V_TacChestrig_oli_F","V_HarnessOGL_ghex_F"]);
    for "_i" from 1 to 4 do {_x addItemToUniform _magazinePrimary};
    for "_i" from 1 to 4 do {_x addItemToVest _magazineSecondary};
    _x addBackpack (selectRandom ["","","B_AssaultPack_blk","B_Bergen_blk","B_Carryall_oucamo","B_FieldPack_oucamo","B_Kitbag_rgr_Exp","B_AssaultPack_mcamo_AA"]);
    for "_i" from 1 to 4 do {_x addItemToBackpack _magazinePrimary};
    for "_i" from 1 to 4 do {_x addItemToBackpack _magazineSecondary};
    //_x addHeadgear "";
    //_x addGoggles "";

    _x linkItem "ItemMap";
    _x linkItem "ItemCompass";
    _x linkItem "ItemWatch";
    _x linkItem "ItemRadio";
    //_x linkItem "ItemGPS";
}forEach (units _group1);

 

I tried using the BIS_fnc_addWeapon function and it worked for random weapons, but it didn't work for ammo, here's the example I used:

 

[_x, (selectRandom [ "arifle_MX_F","arifle_Katiba_F","srifle_DMR_01_F","SMG_01_F","arifle_MX_khk_F","arifle_AK12_F","arifle_AKM_F","srifle_DMR_07_blk_F","LMG_Mk200_F","LMG_Zafir_F",3])] call BIS_fnc_addWeapon;

 

Share this post


Link to post
Share on other sites

@gustavoalvares 

 

I can't help but I'd suggest editing your post and use the code blocks <> to add your script, the ever helpful scripters will thank you for it. :icon_biggrin:

 

  • Thanks 3
  • Haha 1

Share this post


Link to post
Share on other sites

I don't know if this helps.

_magazinePrimary = getArray (configFile >> "CfgWeapons" >> _weaponPrimary >> "magazines");

to

_magazinePrimary = getArray (configFile / "CfgWeapons" / _weaponPrimary / "magazines");

 

Fixed

 

[_x, (selectRandom [ "arifle_MX_F","arifle_Katiba_F","srifle_DMR_01_F","SMG_01_F","arifle_MX_khk_F","arifle_AK12_F","arifle_AKM_F","srifle_DMR_07_blk_F","LMG_Mk200_F","LMG_Zafir_F"]),3] call BIS_fnc_addWeapon;

  • Thanks 1

Share this post


Link to post
Share on other sites
2 hours ago, gustavoalvares said:

_weaponPrimary = selectRandom [
    "arifle_MX_F",
    "arifle_Katiba_F",
    "srifle_DMR_01_F",
    "SMG_01_F",
    "arifle_MX_khk_F",
    "arifle_AK12_F",
    "arifle_AKM_F",
    "srifle_DMR_07_blk_F",
    "LMG_Mk200_F",
    "LMG_Zafir_F"
]; 

_weaponSecondary = selectRandom  [
    "hgun_Rook40_F",
    "hgun_ACPC2_snds_F",
    "hgun_PDW2000_F",
    "hgun_P07_khk_F"
]; 

_magazinePrimary = getArray (configFile >> "CfgWeapons" >> _weaponPrimary >> "magazines");
_magazineSecondary = getArray (configFile >> "CfgWeapons" >> _weaponSecondary >> "magazines");

Add this section to the forEach loop.

 

What you did is to select a random weapon and apply it to every unit of the group instead of selecting a random weapon for every unit of the group.

Should fix the first part of the problem.

Let me take a look one the script to fix the other problem as well.

  • Thanks 1

Share this post


Link to post
Share on other sites

@Smart Games I think I understand, I should start the {...} forEach right at the beginning of the script where the weapons are, it would look like this:

// Loadout

{
    _weaponPrimary = selectRandom [
        "arifle_MX_F",
        "arifle_Katiba_F",
        "srifle_DMR_01_F",
        "SMG_01_F",
        "arifle_MX_khk_F",
        "arifle_AK12_F",
        "arifle_AKM_F",
        "srifle_DMR_07_blk_F",
        "LMG_Mk200_F",
        "LMG_Zafir_F"
    ]; 
    
    _weaponSecondary = selectRandom [
        "hgun_Rook40_F",
        "hgun_ACPC2_snds_F",
        "hgun_PDW2000_F",
        "hgun_P07_khk_F"
    ]; 
    
    _magazinePrimary = getArray (configFile >> "CfgWeapons" >> _weaponPrimary >> "magazines");
    _magazineSecondary = getArray (configFile >> "CfgWeapons" >> _weaponSecondary >> "magazines");

    removeAllWeapons _x;
    removeAllItems _x;
    removeAllAssignedItems _x;
    removeUniform _x;
    removeVest _x;
    removeBackpack _x;
    removeHeadgear _x;
    removeGoggles _x;
    _x removeItem "NVGoggles";
    _x unassignItem "NVGoggles";

    _x addWeapon _weaponPrimary;
    _x addPrimaryWeaponItem (selectRandom ["","","optic_Yorris","optic_MRD","CUP_optic_Kobra","optic_Aco","optic_ACO_grn","optic_Aco_smg","optic_ACO_grn_smg","CUP_optic_SB_11_4x20_PM","optic_Holosight","optic_Holosight_smg","optic_Arco","optic_Hamr","optic_Arco_AK_blk_F","optic_Arco_blk_F","optic_ERCO_blk_F","optic_MRCO","CUP_optic_PechenegScope","CUP_optic_PSO_1","CUP_optic_PSO_1_AK","optic_DMS","optic_SOS","CUP_optic_LeupoldMk4","optic_AMS","optic_KHS_blk","CUP_optic_PSO_1_1","CUP_optic_PSO_3"]);
    _x addPrimaryWeaponItem (selectRandom ["","","acc_flashlight","acc_flashlight_smg_01","acc_flashlight_pistol","CUP_acc_ANPEQ_15_Black","acc_pointer_IR","muzzle_snds_L","CUP_muzzle_snds_MicroUzi","muzzle_snds_M","CUP_muzzle_snds_KZRZP_AK545","muzzle_snds_H","CUP_muzzle_snds_KZRZP_AK762","muzzle_snds_B","CUP_muzzle_snds_KZRZP_SVD","CUP_muzzle_snds_SCAR_H","muzzle_snds_338_black","CUP_muzzle_snds_AWM","bipod_01_F_blk","bipod_02_F_blk","bipod_03_F_blk","bipod_02_F_lush","CUP_optic_ekp_8_02"]);
    //_x enableGunLights "forceOn";
    _x addWeapon _weaponSecondary;

    _x forceAddUniform (selectRandom ["U_O_R_Gorka_01_camo_F","U_O_R_Gorka_01_black_F","U_O_R_Gorka_01_brown_F","U_O_R_Gorka_01_camo_F"]);
    //for "_i" from 1 to 4 do {_x addItemToUniform _magazinePrimary};
    //for "_i" from 1 to 4 do {_x addItemToUniform _magazineSecondary};
    _x addVest (selectRandom ["","V_Rangemaster_belt","V_BandollierB_blk","V_HarnessOSpec_gry","V_TacVest_blk_POLICE","V_Press_F","V_PlateCarrierIA1_dgtl","V_PlateCarrier1_rgr","V_PlateCarrier2_blk","V_SmershVest_01_F","V_Chestrig_khk","V_TacVest_oli","V_TacChestrig_oli_F","V_HarnessOGL_ghex_F"]);
    for "_i" from 1 to 4 do {_x addItemToUniform _magazinePrimary};
    for "_i" from 1 to 4 do {_x addItemToVest _magazineSecondary};
    _x addBackpack (selectRandom ["","","B_AssaultPack_blk","B_Bergen_blk","B_Carryall_oucamo","B_FieldPack_oucamo","B_Kitbag_rgr_Exp","B_AssaultPack_mcamo_AA"]);
    for "_i" from 1 to 4 do {_x addItemToBackpack _magazinePrimary};
    for "_i" from 1 to 4 do {_x addItemToBackpack _magazineSecondary};
    //_x addHeadgear "";
    //_x addGoggles "";

    _x linkItem "ItemMap";
    _x linkItem "ItemCompass";
    _x linkItem "ItemWatch";
    _x linkItem "ItemRadio";
    //_x linkItem "ItemGPS";
}forEach (units _group1);

 

Share this post


Link to post
Share on other sites

For ammunition I had the idea to use the script in this example that serves to spawn weapons on the ground. That way it works, the weapons spawn with the ammo on the ground too, but I don't know why it doesn't add to the NPCs.
Here's the script:

_markerPos = getMarkerPos "lootMilitary";


_chance_house = 25;
_max_positions = 2;
_house_radius = 500;
_box_classname = "GroundWeaponHolder";
_max_magazines = 3;

_weaponArray = [
    "arifle_MX_F",
    "arifle_Katiba_F",
    "hgun_Rook40_F",
    "hgun_ACPC2_snds_F",
    "srifle_DMR_01_F",
    "hgun_PDW2000_F",
    "SMG_01_F",
    "arifle_MX_khk_F",
    "hgun_P07_khk_F",
    "arifle_AK12_F",
    "arifle_AKM_F",
    "srifle_DMR_07_blk_F",
    "LMG_Mk200_F",
    "LMG_Zafir_F"
]; 

_itemBoxArray = []; 

_houseArray = (_markerPos nearObjects ["house", _house_radius]) select {random 100 < _chance_house};

{
     _buildingPositions = [_x, (random ceil _max_positions)] call BIS_fnc_buildingPositions;
     {
         _weapon = _weaponArray select (floor (random (count _weaponArray)));
         _itemBox = _box_classname createVehicle [0,0,0];
         _itemBox setPos _x;
         _itemBox addWeaponCargoGlobal [_weapon,1];
         _magazines = getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines");
         _mag = _magazines select (floor (random (count _magazines)));
         _itemBox addMagazineCargoGlobal [_mag, (ceil random _max_magazines)];
         _itemBoxArray = _itemBoxArray + [_itemBox];
     } forEach _buildingPositions;
} forEach _houseArray; 


 

Share this post


Link to post
Share on other sites

I primarily changed the structure of the code, but it is definitely working:

private _group = ["CUP_O_RU_Soldier_TL_M_EMR","CUP_O_RU_Soldier_M_EMR","CUP_O_RU_Soldier_M_EMR","CUP_O_RU_Crew_M_EMR","CUP_O_RU_Medic_M_EMR","CUP_O_RU_Soldier_AR_M_EMR","CUP_O_RU_Soldier_Marksman_M_EMR"];
private _weaponsPrimary = ["arifle_MX_F","arifle_Katiba_F","srifle_DMR_01_F","SMG_01_F","arifle_MX_khk_F","arifle_AK12_F","arifle_AKM_F","srifle_DMR_07_blk_F","LMG_Mk200_F","LMG_Zafir_F"];
private _weaponsSecondary = ["hgun_Rook40_F","hgun_ACPC2_snds_F","hgun_PDW2000_F","hgun_P07_khk_F"];
private _optics = ["","","optic_Yorris","optic_MRD","CUP_optic_Kobra","optic_Aco","optic_ACO_grn","optic_Aco_smg","optic_ACO_grn_smg","CUP_optic_SB_11_4x20_PM","optic_Holosight","optic_Holosight_smg","optic_Arco","optic_Hamr","optic_Arco_AK_blk_F","optic_Arco_blk_F","optic_ERCO_blk_F","optic_MRCO","CUP_optic_PechenegScope","CUP_optic_PSO_1","CUP_optic_PSO_1_AK","optic_DMS","optic_SOS","CUP_optic_LeupoldMk4"];
private _flashLights = ["","","acc_flashlight","acc_flashlight_smg_01","acc_flashlight_pistol","CUP_acc_ANPEQ_15_Black","acc_pointer_IR","muzzle_snds_L","CUP_muzzle_snds_MicroUzi","muzzle_snds_M","CUP_muzzle_snds_KZRZP_AK545","muzzle_snds_H","CUP_muzzle_snds_KZRZP_AK762","muzzle_snds_B","CUP_muzzle_snds_KZRZP_SVD","CUP_muzzle_snds_SCAR_H","muzzle_snds_338_black","CUP_muzzle_snds_AWM","bipod_01_F_blk","bipod_02_F_blk","bipod_03_F_blk","bipod_02_F_lush","CUP_optic_ekp_8_02"];
private _unitforms = ["U_O_R_Gorka_01_camo_F","U_O_R_Gorka_01_black_F","U_O_R_Gorka_01_brown_F","U_O_R_Gorka_01_camo_F"];
private _vests =  ["","V_Rangemaster_belt","V_BandollierB_blk","V_HarnessOSpec_gry","V_TacVest_blk_POLICE","V_Press_F","V_PlateCarrierIA1_dgtl","V_PlateCarrier1_rgr","V_PlateCarrier2_blk","V_SmershVest_01_F","V_Chestrig_khk","V_TacVest_oli","V_TacChestrig_oli_F","V_HarnessOGL_ghex_F"];
private _backpacks = ["","","B_AssaultPack_blk","B_Bergen_blk","B_Carryall_oucamo","B_FieldPack_oucamo","B_Kitbag_rgr_Exp","B_AssaultPack_mcamo_AA"];
private _behaviour = ["STEALTH","SAFE"];

private _group1 = [[4862,7985.24,0], EAST, _group] call BIS_fnc_spawnGroup; //i just used two custom positions, no markers
[_group1, [4949.73,7922.12,0]] call BIS_fnc_taskDefend;
_group1 setBehaviour (selectRandom _behaviour);
_group1 allowFleeing 0;


{
  _weaponPrimary = selectRandom _weaponsPrimary;
  _weaponSecondary = selectRandom  _weaponsSecondary;
  _magazinePrimary = selectRandom ([_weaponPrimary] call BIS_fnc_compatibleMagazines);
  _magazineSecondary = selectRandom ([_weaponSecondary] call BIS_fnc_compatibleMagazines);

  removeAllWeapons _x;
  removeAllItems _x;
  removeAllAssignedItems _x;
  removeUniform _x;
  removeVest _x;
  removeBackpack _x;
  removeHeadgear _x;
  removeGoggles _x;

  _x setSkill ["spotDistance",0.8];
  _x setSkill ["aimingShake",0.6];
  _x setSkill ["spotTime",0.65];
  _x removeItem "NVGoggles";
  _x unassignItem "NVGoggles";
  _x addWeapon _weaponPrimary;
  _x addPrimaryWeaponItem (selectRandom _optics);
  _x addPrimaryWeaponItem (selectRandom _flashLights);
  _x addWeapon _weaponSecondary;
  _x forceAddUniform (selectRandom _unitforms);
  _x addVest (selectRandom _vests);
  _x addBackpack (selectRandom _backpacks);
  _x linkItem "ItemMap";
  _x linkItem "ItemCompass";
  _x linkItem "ItemWatch";
  _x linkItem "ItemRadio";


  for "_i" from 1 to 4 do {_x addItemToUniform _magazinePrimary};
  for "_i" from 1 to 4 do {_x addItemToVest _magazineSecondary};

  for "_i" from 1 to 4 do {_x addItemToBackpack _magazinePrimary};
  for "_i" from 1 to 4 do {_x addItemToBackpack _magazineSecondary};

} forEach (units _group1);

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
22 minutes ago, gustavoalvares said:

configFile >> "CfgWeapons" >> _weapon >> "magazines"

Use the Config Viewer, this path does not exist.

Share this post


Link to post
Share on other sites
On 7/27/2021 at 12:44 AM, gustavoalvares said:

to spawn enemies, but I would like to make them spawn with random weapons and equipment.

 

 

 

 Place 10 enemies on the map. Give them specific rifles and equipment

 

They should be numbered from  0 to 9

 

Write a script that deletes (say) 5 of them at random.

 

Presto!  You now have 5 enemies and every time you start the mission they will have a different set of weapons!

.

 

 

 

Share this post


Link to post
Share on other sites

I generally do what @Smart Games has suggested for random loadouts. Once you get it set up it's incredibly easy to move from one mission to another, or swap classnames in and out. Plus, you can apply it to any number of units, whenever you need it. The only way I do it differently is to declare all the loadouts in a separate .sqf and save them into public variable, and sometimes use predefined loadout sets. For example, below the MIL_EasterEgg is a predefined set and the rest is just like Smart Games has done (MIL_EasterEgg uses setUnitLoadout in the spawn script).

 

opForLoadouts.sqf

MIL_EasterEgg = [
	["sgun_HunterShotgun_01_sawedoff_F","","","",["2Rnd_12Gauge_Pellets",2],[],""],
	[],
	["hgun_Pistol_heavy_02_F","","","",["6Rnd_45ACP_Cylinder",6],[],""],
	["U_C_Uniform_Scientist_02_F",[["FirstAidKit",2]]],
	["rhs_vest_commander",[["2Rnd_12Gauge_Pellets",4,2],["6Rnd_45ACP_Cylinder",3,6]]],
	["B_CombinationUnitRespirator_01_F",[["Chemlight_blue",2,1],["Chemlight_green",2,1],["Chemlight_red",2,1],["Chemlight_yellow",2,1]]],
	"H_Hat_Tinfoil_F","G_Blindfold_01_white_F",
	[],
	["ItemMap","ItemGPS","ItemRadio","ItemCompass","ItemWatch",""]
];
MIL_EasterEggAvailable = true;

MIL_Uniforms = ["U_OrestesBody","U_Marshal","U_C_Poor_1","U_I_C_Soldier_Bandit_2_F","U_I_C_Soldier_Bandit_5_F","U_I_C_Soldier_Bandit_3_F","U_I_C_Soldier_Para_5_F","U_C_Man_casual_6_F","U_C_Man_casual_4_F","U_C_Man_casual_5_F","U_C_E_LooterJacket_01_F","U_I_L_Uniform_01_tshirt_black_F","U_I_L_Uniform_01_tshirt_skull_F","U_I_L_Uniform_01_tshirt_sport_F","U_C_Uniform_Scientist_02_formal_F","U_O_R_Gorka_01_black_F","U_C_Mechanic_01_F"];
MIL_Webbing = ["V_TacVestIR_blk","V_Chestrig_rgr","V_HarnessO_brn","V_BandollierB_cbr","rhs_vydra_3m","rhsusf_iotv_ocp","rhsusf_mbav","rhsusf_plateframe_sapi","rhsusf_spcs_ucp","rhs_6b5_khaki","rhsgref_alice_webbing","V_LegStrapBag_olive_F","V_Rangemaster_belt","V_Press_F","V_SmershVest_01_F","V_CarrierRigKBT_01_EAF_F","rhs_6sh46","V_Pocketed_coyote_F"];
MIL_Packs = ["B_AssaultPack_blk","rhsusf_assault_eagleaiii_coy","B_FieldPack_ghex_F","B_Kitbag_rgr","B_Messenger_Gray_F","rhs_sidor","B_TacticalPack_mcamo"];

MIL_Primaries = [["rhs_weap_ak104_zenitco01_b33","rhs_acc_pgs64","rhs_30Rnd_762x39mm_polymer",true],["rhs_weap_ak105_zenitco01_b33","rhs_acc_pgs64","rhs_30Rnd_545x39_7N10_AK",true],["rhs_weap_ak74","rhs_acc_dtk1983","rhs_30Rnd_545x39_7N6M_AK",false],["rhs_weap_ak74n","rhs_acc_dtk1983","rhs_30Rnd_545x39_7N6M_AK",false],["rhs_weap_akm","rhs_acc_dtkakm","rhs_30Rnd_762x39mm_bakelite",false],["rhs_weap_akms","rhs_acc_dtkakm","rhs_30Rnd_762x39mm_bakelite",false],["rhs_weap_aks74","rhs_acc_dtk1983","rhs_30Rnd_545x39_7N6M_AK",false],["rhs_weap_aks74u","rhs_acc_dtk1983","rhs_30Rnd_545x39_7N6M_AK",false],["rhs_weap_m14_rail_wd","","rhsusf_20Rnd_762x51_m80_Mag",true],["rhs_weap_m16a4_carryhandle","","rhs_mag_30Rnd_556x45_M855A1_Stanag",false],["rhs_weap_m24sws_d","","rhsusf_5Rnd_762x51_m118_special_Mag",true],["rhs_weap_m4","","rhs_mag_30Rnd_556x45_M855A1_Stanag",true],["rhs_weap_m4a1_carryhandle","","rhs_mag_30Rnd_556x45_M855A1_Stanag",true],["rhs_weap_M590_8RD","","rhsusf_8Rnd_00Buck",false],["rhs_weap_M590_5RD","","rhsusf_5Rnd_00Buck",false],["rhsusf_weap_MP7A2_winter","","rhsusf_mag_40Rnd_46x30_FMJ",true],["rhs_weap_Izh18","","rhsgref_1Rnd_00Buck",false],["rhs_weap_kar98k","","rhsgref_5Rnd_792x57_kar98k",false],["rhs_weap_l1a1_wood","rhsgref_acc_falMuzzle_l1a1","rhs_mag_20Rnd_762x51_m80_fnfal",false],["rhs_weap_m1garand_sa43","","rhsgref_8Rnd_762x63_M2B_M1rifle",false],["rhs_weap_m3a1_specops","","rhsgref_30rnd_1143x23_M1911B_SMG",false],["rhs_weap_m70ab2","","rhs_75Rnd_762x39mm",false],["rhs_weap_m38","","rhsgref_5Rnd_762x54_m38",false],["rhs_weap_MP44","","rhsgref_30Rnd_792x33_SmE_StG",false],["rhs_weap_savz61","","rhsgref_20rnd_765x17_vz61",false],["rhs_weap_g36c","","rhssaf_30rnd_556x45_EPR_G36",true]];
MIL_PrimaryAttachments_Optic = ["rhsusf_acc_ACOG_USMC","rhsusf_acc_EOTECH","rhsusf_acc_eotech_552","rhsusf_acc_compm4","rhsusf_acc_RX01_NoFilter","rhsusf_acc_mrds","rhsusf_acc_mrds_c","rhsusf_acc_RM05","rhsusf_acc_T1_high","rhsusf_acc_T1_low","rhsusf_acc_eotech_xps3"];
MIL_PrimaryAttachments_Grip = ["rhsusf_acc_grip2","rhsusf_acc_grip1","rhsusf_acc_harris_bipod","rhsusf_acc_kac_grip","rhsusf_acc_rvg_blk","rhsusf_acc_rvg_de","rhsusf_acc_tacsac_blue","rhsusf_acc_tdstubby_blk","rhsusf_acc_grip3","rhsusf_acc_grip2","rhsusf_acc_grip1","rhsusf_acc_harris_bipod","rhsusf_acc_kac_grip","rhsusf_acc_rvg_blk","rhsusf_acc_rvg_de","rhsusf_acc_tdstubby_blk","rhsusf_acc_grip3"];
MIL_Secondaries = [["rhs_weap_6p53","rhs_18rnd_9x21mm_7N28"],["rhs_weap_pya","rhs_mag_9x19_17"],["rhs_weap_makarov_pm","rhs_mag_9x18_8_57N181S"],["rhsusf_weap_glock17g4","rhsusf_mag_17Rnd_9x19_JHP"],["rhsusf_weap_m1911a1","rhsusf_mag_7x45acp_MHP"],["rhsusf_weap_m9","rhsusf_mag_15Rnd_9x19_JHP"],["rhs_weap_savz61_folded","rhsgref_20rnd_765x17_vz61"],["rhs_weap_tt33","rhs_mag_762x25_8"],["rhs_weap_type94_new","rhs_mag_6x8mm_mhp"],["rhs_weap_cz99","rhssaf_mag_15Rnd_9x19_FMJ"]];
MIL_Torches = ["rhsusf_acc_M952V","rhsusf_acc_wmx","rhs_acc_2dpZenit_ris","acc_flashlight_pistol"];
MIL_Headgear = ["H_Bandanna_surfer","H_Beret_blk","H_Cap_blu","H_Hat_checker","H_Helmet_Skate","rhs_6b26_green","rhs_altyn_visordown","rhs_beanie_green","rhs_ssh68","rhsusf_opscore_bk","rhsusf_opscore_coy_cover","rhsusf_opscore_fg","rhsusf_opscore_mc","rhsusf_opscore_paint","rhsusf_protech_helmet","rhsgref_helmet_M1_des","rhsgref_helmet_m1940_camo01","rhsgref_hat_m43cap_heer","H_HeadBandage_stained_F","H_HeadBandage_bloody_F"];
MIL_Facewear = ["G_Bandanna_aviator","G_Bandanna_beast","G_Bandanna_blk","G_Bandanna_khk","G_Bandanna_oli","G_Bandanna_shades","G_Bandanna_sport","G_Bandanna_tan","G_AirPurifyingRespirator_02_black_F","G_AirPurifyingRespirator_02_olive_F","G_AirPurifyingRespirator_02_sand_F","G_AirPurifyingRespirator_01_F","G_RegulatorMask_F","rhs_scarf","rhsusf_shemagh2_gogg_grn","rhsusf_shemagh2_gogg_od","rhsusf_shemagh2_gogg_tan","rhsusf_shemagh2_gogg_white"];

{
	publicVariable _x;
} forEach [
	"MIL_EasterEgg",
	"MIL_EasterEggAvailable",
	"MIL_Uniforms",
	"MIL_Webbing",
	"MIL_Packs",
	"MIL_Primaries",
	"MIL_PrimaryAttachments_Optic",
	"MIL_PrimaryAttachments_Grip",
	"MIL_Secondaries",
	"MIL_Headgear",
	"MIL_Facewear"
];

paraFlag setVariable ["MIL_OpForLoadouts_Ready",true];

 

  • Thanks 2

Share this post


Link to post
Share on other sites

@beno_83au, that's where I like to use Config files for. Makes it much easier to read. I simply load them into the game at the start of the mission to get the same format as you. 

  • Like 2

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

×