Weapon Caches Disappearing

HospitalChair

Well-Known Member
Ive added two weapon caches to my server via the 3d editor. They work great on restart then after about 20 minutes they seem to disappear. Anyone have any idea why this may be happening or how i can stop it?
 
Use this code on them in the sqf.

Code:
_crate setVariable ["ObjectID",""];

if course change _crate to whatever your local reference is to them.
 
Code:
class cleanup_objects
    {
      name = "cleanup_objects";
      //init = /*%FSM<STATEINIT""">*/"_missionObjs =  allMissionObjects ""ReammoBox"";" \n
       "//_qty = count _missionObjs;" \n
       ""// \n
       "diag_log (""CLEANUP:TOTAL "" + str(_qty) + "" LOOT BAGS"");" \n
       "" \n
       "_dateNow = (DateToNumber date);" \n
       "_delQty = 0;" \n
       "{" \n

I commented the first 3 lines out like HospitalChair adviced in my topic.

They are loaded in, just empty and moved away from the world space i added in the database.
 
I really don't get why they are moving. I can understand disappearing but to be physically moved to another location is what's getting me.
 
I wouldn't use that "fix". The class ReammoBox is used by the ammo crates you find spawned in barracks every now and then and commenting out that line would prevent them from being despawned.

Setting an ObjectID to the crates is a better way of preventing the cleanup.
 
If you can show me your script that spawns them in I may be able to figure out why the server is moving them.
 
Looks like weapon caches spawned by the mission file are still disappearing. (being cleaned up) i've added CZBasicWeapons_EP1.
 
The mission as in the sqm file?

What does your file look like? You can paste it on pastebin.com and link it. Format doesn't matter.
 
See how your spawning the crates here?
Code:
if (true) then
{
  _this = createVehicle ["CZBasicWeapons_EP1", [6822.0322, 2498.6736, -9.5367432e-007], [], 0, "CAN_COLLIDE"];
  _vehicle_2106 = _this;
  _this setPos [6822.0322, 2498.6736, -9.5367432e-007];
};

Do this with all your crates.
Code:
if (true) then
{
  _this = createVehicle ["CZBasicWeapons_EP1", [6822.0322, 2498.6736, -9.5367432e-007], [], 0, "CAN_COLLIDE"];
  _vehicle_2106 = _this;
  _this setPos [6822.0322, 2498.6736, -9.5367432e-007];
  _this setVariable ["ObjectID",""];
};
 
Code:
if (true) then
{
  _this = createVehicle ["CZBasicWeapons_EP1", [6822.0322, 2498.6736, -9.5367432e-007], [], 0, "CAN_COLLIDE"];
  _vehicle_2106 = _this;
  _this setPos [6822.0322, 2498.6736, -9.5367432e-007];
};

Try this...

Code:
if (true) then
{
  _this = createVehicle ["CZBasicWeapons_EP1", [6822.0322, 2498.6736, -9.5367432e-007], [], 0, "CAN_COLLIDE"];
  _vehicle_2106 = _this;
  _this setPos [6822.0322, 2498.6736, -9.5367432e-007];
  _this setVariable ["permaloot",true];
};
 
Back
Top