locked boxes in the mission

  • Offline Souza
  • Geared Up
  • **
  • Posts: 44

locked boxes in the mission

« posted: Feb 10, 2019, 02:01 PM »

how to unlock locked boxes in mission


after finishing the mission does not appear the option to move or give load   


//SuperBox
   _box1 = createVehicle [selectRandom A3W_SuperBoxes, _lastPos, [], 2, "None"];
   _box1 setDir random 360;
   [_box1, "TWB_SuperBox"] call fn_refillbox;
   _box2 = createVehicle [selectRandom A3W_LargeBoxes, _lastPos, [], 2, "None"];
   _box2 setDir random 360;
   _box3 = createVehicle [selectRandom A3W_LargeBoxes, _lastPos, [], 2, "None"];
   _box3 setDir random 360;
   _box4 = createVehicle [selectRandom A3W_LargeBoxes, _lastPos, [], 2, "None"];
   _box4 setDir random 360;
   _box5 = createVehicle [selectRandom A3W_MediumBoxes, _lastPos, [], 2, "None"];
   _box5 setDir random 360;   
   _box6 = createVehicle [selectRandom A3W_MediumBoxes, _lastPos, [], 2, "None"];
   _box6 setDir random 360;   
   _boxesArray = [_box1, _box2, _box3, _box4, _box5, _box6];   

   // Unlock
   { _x setVariable ["allowDamage", true, true] } forEach _boxesArray;         
   { _x setVariable ["R3F_LOG_disabled", false] } forEach _boxesArray;   
   { _x setVariable ["A3W_inventoryLockR3F", false, false] } forEach _boxesArray;





these are the boxes that respanw

// Boxes
A3W_SuperBoxes = ["CargoNet_01_box_F"];
A3W_LargeBoxes = ["Box_T_NATO_WpsSpecial_F","Box_T_East_WpsSpecial_F","Box_IND_WpsSpecial_F","Box_East_WpsSpecial_F","Box_NATO_WpsSpecial_F",
   "O_CargoNet_01_ammo_F","I_CargoNet_01_ammo_F","B_CargoNet_01_ammo_F",
   "Box_Syndicate_WpsLaunch_F","Box_IND_WpsLaunch_F","Box_East_WpsLaunch_F","Box_NATO_WpsLaunch_F"];
A3W_MediumBoxes = ["I_supplyCrate_F","IG_supplyCrate_F","B_supplyCrate_F",
   "Box_IND_Support_F","Box_East_Support_F","Box_NATO_Support_F",
   "Box_CSAT_Equip_F","Box_AAF_Equip_F","Box_NATO_Equip_F",
   "Box_AAF_Uniforms_F","Box_CSAT_Uniforms_F","Box_NATO_Uniforms_F"];
A3W_SmallBoxes = ["Box_FIA_Ammo_F","Box_FIA_Support_F","Box_FIA_Wps_F",
   "Box_IND_AmmoOrd_F","Box_East_AmmoOrd_F","Box_NATO_AmmoOrd_F"];

Re: locked boxes in the mission

« Reply #1 posted: Feb 13, 2019, 09:13 AM »
Code: [Select]
   { _x setVariable ["R3F_LOG_disabled", false] } forEach _boxesArray;   
   { _x setVariable ["A3W_inventoryLockR3F", false, false] } forEach _boxesArray;

Should be

Code: [Select]
   { _x setVariable ["R3F_LOG_disabled", false, true] } forEach _boxesArray;   
   { _x setVariable ["A3W_inventoryLockR3F", false, true] } forEach _boxesArray;

The second boolean designates whether the variable is global or not. If you want it to be usable by other scripts you have to set it to true.
  • Offline Souza
  • Geared Up
  • **
  • Posts: 44

Re: locked boxes in the mission

« Reply #2 posted: Feb 13, 2019, 09:12 PM »
Code: [Select]
   { _x setVariable ["R3F_LOG_disabled", false] } forEach _boxesArray;   
   { _x setVariable ["A3W_inventoryLockR3F", false, false] } forEach _boxesArray;

Should be

Code: [Select]
   { _x setVariable ["R3F_LOG_disabled", false, true] } forEach _boxesArray;   
   { _x setVariable ["A3W_inventoryLockR3F", false, true] } forEach _boxesArray;

The second boolean designates whether the variable is global or not. If you want it to be usable by other scripts you have to set it to true.



I did as directed, but I can not move the boxes

Re: locked boxes in the mission

« Reply #3 posted: Feb 13, 2019, 09:30 PM »
Where are you putting the code to unlock the boxes? is it in the _sucessExec block?
  • Offline Souza
  • Geared Up
  • **
  • Posts: 44

Re: locked boxes in the mission

« Reply #4 posted: Feb 13, 2019, 10:09 PM »

I was able to enable to move by adding to the following path

addons\R3F_ARTY_AND_LOG\R3F_LOG/config


thank you very much BIB_Monkey

Re: locked boxes in the mission

« Reply #5 posted: Feb 27, 2019, 08:23 AM »
Will try to use the formula you have used