tryteyker 28 Posted December 21, 2013 Hi, so addPrimaryWeaponItem doesn't work for me somehow. I've tried with acc_flashlight and acc_pointer_IR, no joy. Anybody see anything wrong with this function? TRT_FNC_SWATLD = { _unit = _this select 0; removeAllWeapons _unit; removeAllAssignedItems _unit; removeUniform _unit; removeVest _unit; removeHeadgear _unit; _unit addHeadgear "H_HelmetIA"; _unit addUniform "U_I_CombatUniform_shortsleeve"; _unit addVest "V_TacVest_blk_POLICE"; nul = [_unit, "arifle_MX_Black_F",4] spawn BIS_fnc_addWeapon; _unit addMagazines ["MiniGrenade",2]; _unit addMagazines ["SmokeShellGreen",2]; _unit addMagazine "DemoCharge_Remote_Mag"; _unit addPrimaryWeaponItem "acc_flashlight"; _unit addPrimaryWeaponItem "optic_Nightstalker"; _unit linkItem "NVGoggles_INDEP"; }; _unit is player. I also applied a flashlight manually (via supply box), and it is definitely compatible. Just the script version doesn't work. Share this post Link to post Share on other sites
Egypt~Seal 10 Posted December 21, 2013 instead of nul = [_unit, "arifle_MX_Black_F",4] spawn BIS_fnc_addWeapon; Write down this _unit addweapon 'arifle_MX_Black_F'; then add Ammo _unit addMagazine '30Rnd_9x21_Mag'; _unit addMagazine '30Rnd_9x21_Mag'; _unit addMagazine '30Rnd_9x21_Mag'; _unit addMagazine '30Rnd_9x21_Mag'; _unit addMagazine '30Rnd_9x21_Mag'; _unit addMagazine '30Rnd_9x21_Mag'; And then write down your attachments Share this post Link to post Share on other sites
tryteyker 28 Posted December 21, 2013 There's no difference between the two commands. The function just does it quicker and more efficient. Share this post Link to post Share on other sites
Egypt~Seal 10 Posted December 21, 2013 Just give it a try, because it might be a conflict between the "quicker" function and the normal add, as i tested it and it worked Share this post Link to post Share on other sites
Beerkan 71 Posted December 21, 2013 Just give it a try, because it might be a conflict between the "quicker" function and the normal add, as i tested it and it worked Guys,lower your handbags. try this [_unit, "arifle_MX_Black_F" ,6 ,"30Rnd_65x39_caseless_mag"] call BIS_fnc_addWeapon; Share this post Link to post Share on other sites
Egypt~Seal 10 Posted December 21, 2013 (edited) try this [_unit, "arifle_MX_Black_F" ,6 ,"30Rnd_65x39_caseless_mag"] call BIS_fnc_addWeapon; Whoops its working , Edited December 21, 2013 by Egypt~Seal Share this post Link to post Share on other sites
tryteyker 28 Posted December 21, 2013 (edited) Doesn't fix the issue of addprimaryweaponitem not working, unfortunately. Classic case of sleep .1 finding its use in a script. Fixed it (add a millisecond sleep before adding primary items). Edited December 21, 2013 by tryteyker Share this post Link to post Share on other sites