Using SQF for loadouts fail in multiplayer
New, WishlistPublic

Description

Using SQF for loadouts fail randomly in multiplayer using this in the editor :

nul = [this] execVM "Loadouts\blabla.sqf"

And this in Loadouts\blabla.sqf :

waitUntil {!isNull player};
_unit = _this select 0;

removeAllWeapons _unit;
removeAllItems _unit;

_unit addWeapon "ItemMap";
_unit addWeapon "itemcompass";
_unit addWeapon "itemwatch";
_unit addWeapon "NVGoggles";
_unit addItem "FirstAidKit";
_unit addItem "FirstAidKit";
_unit addItem "FirstAidKit";

_unit addItem "B_UAVTerminal";
_unit assignItem "B_UAVTerminal";
_unit addBackpack "B_UAV_01_backpack_F";

_unit addMagazines ["30Rnd_65x39_caseless_mag",6];
_unit addWeapon "arifle_MXM_F";
_unit addPrimaryWeaponItem "optic_hamr";
_unit addPrimaryWeaponItem "muzzle_snds_h";
_unit addPrimaryWeaponItem "acc_pointer_IR";

_unit addMagazines ["16Rnd_9x21_Mag",3];
_unit addWeapon "hgun_P07_snds_F";

_unit addMagazines ["Chemlight_green",3];
_unit addMagazines ["SmokeShell",3];

if(true) exitWith{};

Sometimes, player have the loadout, sometimes not with the same unit. And it's just an exemple, it i can change the loadout's items, there is the same bug, it's not item relevant. {F22028}

Details

Legacy ID
1737001908
Severity
None
Resolution
Open
Reproducibility
Always
Category
Design-Mission
Steps To Reproduce
  • Create a coop mission with 8 players as divers.
  • Use nul = [this] execVM "Loadouts\blabla.sqf" for each player
  • Use my loadouts\blabla.sqf :

waitUntil {!isNull player};
_unit = _this select 0;

removeAllWeapons _unit;
removeAllItems _unit;

_unit addWeapon "ItemMap";
_unit addWeapon "itemcompass";
_unit addWeapon "itemwatch";
_unit addWeapon "NVGoggles";
_unit addItem "FirstAidKit";
_unit addItem "FirstAidKit";
_unit addItem "FirstAidKit";

_unit addItem "B_UAVTerminal";
_unit assignItem "B_UAVTerminal";
_unit addBackpack "B_UAV_01_backpack_F";

_unit addMagazines ["30Rnd_65x39_caseless_mag",6];
_unit addWeapon "arifle_MXM_F";
_unit addPrimaryWeaponItem "optic_hamr";
_unit addPrimaryWeaponItem "muzzle_snds_h";
_unit addPrimaryWeaponItem "acc_pointer_IR";

_unit addMagazines ["16Rnd_9x21_Mag",3];
_unit addWeapon "hgun_P07_snds_F";

_unit addMagazines ["Chemlight_green",3];
_unit addMagazines ["SmokeShell",3];

if(true) exitWith{};

  • Play.
fwouedd edited Steps To Reproduce. (Show Details)Sep 11 2013, 1:27 PM
fwouedd edited Additional Information. (Show Details)
fwouedd set Category to Design-Mission.
fwouedd set Reproducibility to Always.
fwouedd set Severity to None.
fwouedd set Resolution to Open.
fwouedd set Legacy ID to 1737001908.May 7 2016, 4:39 PM
dedmen added a subscriber: dedmen.Sep 13 2017, 4:27 PM

Should only execute loadout script on local units. This executes it on every unit everytime someone joins into the game.