Gilatar 272 Posted December 3, 2015 Hello! I put together a preset loadout script for my unit a couple of weeks back, and it has worked great up until the newest update. Now it doesn't work on players, but it works fine on AI units. Now, I didn't make the script by myself, I just frankensteined it together from posts on this forum and elsewhere, so if there's any obvious issues with it that'd be why. Anyway, this is what's in the playable unit's initialization line: this call compile preprocessFileLineNumbers "scripts\loadouts\automaticrifleman.sqf"; In scripts\loadouts\automaticrifleman.sqf: private ["_unit", "_backpack", "_uniform", "_vest"]; _unit = _this; if (!local _unit) exitWith {}; if (!isNull _unit) then { removeAllWeapons _unit; removeAllItems _unit; removeBackpack _unit; removeAllAssignedItems _unit; removeUniform _unit; removeVest _unit; removeHeadgear _unit; removeGoggles _unit; /* Other gear, goggles, vest, uniform, backpack */ _unit forceAddUniform "JSOC_OCP_CRYE"; _unit addVest "AV_PlateCarrier1_OCP"; _unit addHeadgear "H_SOC_MARITIME"; _unit addBackpackGlobal "TRYK_B_Belt_CYT"; /* Magazines and weapons in main inventory */ _unit addWeaponGlobal "rhs_weap_m249_pip_S_vfg"; _unit addWeaponGlobal "rhsusf_weap_glock17g4"; _unit addWeaponGlobal "ACE_Vector"; /* Weapons attachments and magazines */ _unit addPrimaryWeaponItem "SMA_eotech552_3XDOWN"; _unit addPrimaryWeaponItem "SMA_ANPEQ15_BLK"; /* Assigned items (maps, radios, NV Goggles, etc */ _unit linkItem "ItemMap"; _unit linkItem "ItemCompass"; _unit linkItem "ACE_Altimeter"; _unit linkItem "ItemRadio"; _unit linkItem "ItemMicroDAGR"; /* Magazines and weapons in vest */ _vest = vestContainer _unit; _vest addMagazineCargoGlobal ["rhs_mag_an_m8hc", 4]; _vest addMagazineCargoGlobal ["rhs_mag_m67", 3]; _vest addMagazineCargoGlobal ["B_IR_Grenade", 4]; _vest addMagazineCargoGlobal ["rhs_mag_m18_green", 2]; _vest addMagazineCargoGlobal ["rhs_200rnd_556x45_B_SAW", 2]; /* Magazines and weapons in uniform */ _uniform = uniformContainer _unit; _uniform addItemCargoGlobal ["ItemcTabHCam", 1]; _uniform addItemCargoGlobal ["ACE_EarPlugs", 1]; _uniform addItemCargoGlobal ["ACE_MapTools", 1]; _uniform addItemCargoGlobal ["ACE_cabletie", 4]; _uniform addItemCargoGlobal ["ACE_morphine", 2]; _uniform addItemCargoGlobal ["ACE_quikclot", 20]; _uniform addItemCargoGlobal ["ACE_tourniquet", 1]; _uniform addItemCargoGlobal ["ACE_epinephrine", 1]; _uniform addMagazineCargoGlobal ["rhsusf_mag_17Rnd_9x19_FMJ", 2]; /* Backpack */ _backpack = unitBackPack _unit; clearMagazineCargoGlobal _backpack; clearWeaponCargoGlobal _backpack; _backpack addItemCargoGlobal ["A3_GPNVG18_BLK_F", 1]; _backpack addMagazineCargoGlobal ["rhs_200rnd_556x45_T_SAW", 2]; }; Share this post Link to post Share on other sites
ArmaMan360 94 Posted December 3, 2015 Can you try making a dummy loadout again with arsenal? Then export the code in notepad++ to see if any commands/functions have changed. Maybe you will see a difference somewhere where you can adapt? I am limited in scripting plz excuse me if it doesnt work :) Share this post Link to post Share on other sites
Gilatar 272 Posted December 3, 2015 Disregard this post - I fixed the issue. Had some leftover loadout lines in the init.sqf that messed up the script :D Share this post Link to post Share on other sites
GuilleGCA 24 Posted December 5, 2015 what is the issue in the .sqf? i copy your sqf but dont work Share this post Link to post Share on other sites
Gilatar 272 Posted December 5, 2015 what is the issue in the .sqf? i copy your sqf but dont work Did you put the first line into the init line of the unit? If so, maybe you didn't replace the classnames? The script lists items from many different mods so you would probably have to replace them for it to work. Share this post Link to post Share on other sites