So using the Wicked AI system script(s) that I have installed inside of my server files i'm trying to create a custom weapon Cache that spawns in my own predifined items. I'm succuesfull in getting the weapon caches to spawn, and by default gear spawns in them because they are using the "ExtraLargeGunBox.sqf" to fill loot inside of them everytime one of them is created. I have modied the script where the gun boxes are created so instead of the code calling "ExtraLargeGunBox.sqf" each time one is created, I call a custom created sqf file by me that fills each box with unique gear to that box. Here is "StaticAmmoBoxes.sqf" where I am creating the boxes at their locations and calloing seperate scripts for each to fill them with gear;
/* Add ammmo boxes to static locations on map and fills it with loot from missionCfg.sqf creates a ammo box at [0,0,0] then fills it _box = createVehicle ["BAF_VehicleBox",[0,0,0], [], 0, "CAN_COLLIDE"]; [_box] call spawn_ammo_box; creates a 2nd ammo box at [1,1,1] then fills it _box2 = createVehicle ["BAF_VehicleBox",[1,1,1], [], 0, "CAN_COLLIDE"]; [_box2] call spawn_ammo_box; add custom ammo boxes below this line */ /* SECTOR B CUSTOM BOXES */ _box = createVehicle ["BAF_VehicleBox",[6643.02,14211.9,0.00164795], [], 0, "CAN_COLLIDE"]; /*SECTOR B WEAPON SUPPLY BOX*/ [_box] call Sector_B_Weapons;
As you can see I call Sector_B_Weapons, inside of that script i have;
//Extra Large Gun Box _box = _this select 0; _box setVariable ["ObjectID","1",true]; _box setVariable ["permaLoot",true]; PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_box]; clearWeaponCargoGlobal _box; clearMagazineCargoGlobal _box; // GUNS _box addWeaponCargoGlobal ["M4A1_AIM_camo", 1]; _box addWeaponCargoGlobal ["Pecheneg", 2]; _box addWeaponCargoGlobal ["MG36", 2]; _box addWeaponCargoGlobal ["RPG7V", 1]; _box addWeaponCargoGlobal ["Mk_48_DES_EP1", 1]; _box addWeaponCargoGlobal ["DMR", 3]; _box addWeaponCargoGlobal ["M249_DZ", 2]; _box addWeaponCargoGlobal ["RH_m14", 1]; _box addWeaponCargoGlobal ["RH_m1stsp", 2]; _box addWeaponCargoGlobal ["BAF_AS50_scoped", 1]; _box addWeaponCargoGlobal ["M60A4_EP1", 1]; _box addWeaponCargoGlobal ["BAF_AS50_TWS", 1]; _box addWeaponCargoGlobal ["Mk48_DES_EP1", 1]; _box addWeaponCargoGlobal ["M249_TWS_EP1", 1]; _box addWeaponCargoGlobal ["M110_TWS_EP1", 1]; _box addWeaponCargoGlobal ["M110_NVG_EP1", 1]; _box addWeaponCargoGlobal ["USSR_cheytacM200_sd", 1]; // AMMO _box addWeaponCargoGlobal ["30Rnd_556x45_Stanag", 40]; _box addWeaponCargoGlobal ["100Rnd_762x54_PK", 6]; _box addWeaponCargoGlobal ["100Rnd_556x45_BetaCMag", 6]; _box addWeaponCargoGlobal ["PG7V", 2]; _box addWeaponCargoGlobal ["20Rnd_762x51_DMR", 16]; _box addWeaponCargoGlobal ["200Rnd_556x45_M249", 16]; _box addWeaponCargoGlobal ["5Rnd_127x99_AS50", 14]; _box addWeaponCargoGlobal ["100Rnd_762x51_M240", 10]; _box addWeaponCargoGlobal ["20Rnd_762x51_B_SCAR", 8]; _box addWeaponCargoGlobal ["USSR_5Rnd_408", 8]; //BACKPACKS _box addBackpackCargoGlobal ["DZ_LargeGunBag_EP1", 3];
But for some reason when I go in-game the box instead spawns 50x M240 Rnds and 50x M249 Rnds. In matter of fact these same two items spawn in every custom box that I create and fill with custom loot on the map, is there a reason for this and could anyone have any idea as of what I am doing wrong here?
Thanks.