Jump to content
  • 0

Help with custom loot box and its contents.


Kidney

Question

Hello and thank you for takin the time to help me out, heres my problem i have made a custom AI mission and when its cleared I would like to reward my players with so top end loot. ive got the guns and money crates working, but for the life of me i cannot figure why I can not get the Building supply box to spawn, nothing shows up in my RPT

 

 

 

 

Here and my contents:

 

          _this addMagazineCargoGlobal ["CinderBlocks", 100];
          _this addMagazineCargoGlobal ["Metal_Floor_Kit", 25];
          _this addMagazineCargoGlobal ["Wood_Ramp_Kit",2"];
          _this addMagazineCargoGlobal ["Cinder_Wall_Kit",20];
          _this addMagazineCargoGlobal ["Metal_Panel_Kit",10];
          _this addMagazineCargoGlobal ["Fuel_Pump_Kit",2];
          _this addMagazineCargoGlobal ["M240_Nest_Kit",1];
          _this addMagazineCargoGlobal ["Wooden_Shed_Kit",4];
          _this addMagazineCargoGlobal ["BagFenceRound_DZ_kit",5];
          _this addMagazineCargoGlobal ["ItemWire", 10];
          _this addMagazineCargoGlobal ["ItemCorrugated", 20];
          _this addMagazineCargoGlobal ["ItemGenerator", 2];
          _this addMagazineCargoGlobal ["ItemSandbag", 50];
          _this addMagazineCargoGlobal ["ItemTankTrap", 5];
          _this addMagazineCargoGlobal ["PartGeneric", 50];
          _this addMagazineCargoGlobal ["30m_plot_kit", 5];
          _this addMagazineCargoGlobal ["MortarBucket", 50];
          _this addMagazineCargoGlobal ["ItemMixOil", 10];
          _this addMagazineCargoGlobal ["PartFueltank",10];
          _this addMagazineCargoGlobal ["PartWheel",10];
          _this addMagazineCargoGlobal ["PartGeneric",10];
          _this addMagazineCargoGlobal ["PartEngine",10];
          _this addMagazineCargoGlobal ["PartGlass",10];
          _this addMagazineCargoGlobal ["ItemJerrycan",10];
          _this addMagazineCargoGlobal ["PartVRotor",2];
          _this addWeaponCargoGlobal   ["Chainsaw", 2];

 

Any help would great thanks.

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

What AI Mission System are you using ?

whats _this defined as ? You need to make a crate using _this variable

i have that i just did not add the whole box script just the contents because i know that somthing in there is not allowing it to spawn, i have 5 others just like that script that work fine, its just the contents, im thinking class names maybe wrong but i can't find a thing about them.

Link to comment
Share on other sites

  • 0

if this will help i will post the whole script:

 

Edit: Im a derp and posted the wrong script.

 

here is the right one.

 

 

if (isServer) then {


        _vehicle_99 = objNull;
        
        if (true) then
        {
          _this = createVehicle ["SpecialWeaponsBox", [14220.2,14143.6,13.5276], [], 0, "CAN_COLLIDE"];
          _vehicle_99 = _this;
          _this setDir 20;
          _this setVariable ["permaLoot",true];

          clearWeaponCargoGlobal _this;
          clearMagazineCargoGlobal _this;

          
          _this addMagazineCargoGlobal ["CinderBlocks", 100];
          _this addMagazineCargoGlobal ["Metal_Floor_Kit", 25];
          _this addMagazineCargoGlobal ["Wood_Ramp_Kit",2"];
          _this addMagazineCargoGlobal ["Cinder_Wall_Kit",20];
          _this addMagazineCargoGlobal ["Metal_Panel_Kit",10];
          _this addMagazineCargoGlobal ["Fuel_Pump_Kit",2];
          _this addMagazineCargoGlobal ["M240_Nest_Kit",1];
          _this addMagazineCargoGlobal ["Wooden_Shed_Kit",4];
          _this addMagazineCargoGlobal ["BagFenceRound_DZ_kit",5];
          _this addMagazineCargoGlobal ["ItemWire", 10];
          _this addMagazineCargoGlobal ["ItemCorrugated", 20];
          _this addMagazineCargoGlobal ["ItemGenerator", 2];
          _this addMagazineCargoGlobal ["ItemSandbag", 50];
          _this addMagazineCargoGlobal ["ItemTankTrap", 5];
          _this addMagazineCargoGlobal ["PartGeneric", 50];
          _this addMagazineCargoGlobal ["30m_plot_kit", 5];
          _this addMagazineCargoGlobal ["MortarBucket", 50];
          _this addMagazineCargoGlobal ["ItemMixOil", 10];
          _this addMagazineCargoGlobal ["PartFueltank",10];
          _this addMagazineCargoGlobal ["PartWheel",10];
          _this addMagazineCargoGlobal ["PartGeneric",10];
          _this addMagazineCargoGlobal ["PartEngine",10];
          _this addMagazineCargoGlobal ["PartGlass",10];
          _this addMagazineCargoGlobal ["ItemJerrycan",10];
          _this addMagazineCargoGlobal ["PartVRotor",2];
          _this addWeaponCargoGlobal   ["Chainsaw", 2];
          
        };
        };

Link to comment
Share on other sites

  • 0

i have that i just did not add the whole box script just the contents because i know that somthing in there is not allowing it to spawn, i have 5 others just like that script that work fine, its just the contents, im thinking class names maybe wrong but i can't find a thing about them.

If the classnames were wrong then atleast the box would spawn.

Link to comment
Share on other sites

  • 0

 

Use Notepad++ with the sqf extension plugin (can be found on armaholic)

You'll see that the problem is in line 3.

 _this addMagazineCargoGlobal ["Wood_Ramp_Kit",2"];

should be

 _this addMagazineCargoGlobal ["Wood_Ramp_Kit",2];

 

 

Son of a.........Good eyes! thanks very much

Link to comment
Share on other sites

  • 0

 

Use Notepad++ with the sqf extension plugin (can be found on armaholic)

 

How did I not know about this? thanks very much this addon will help me ten fold.

 

I have one more question?

Sorry Im still a noob :(

 

These 9 items below I would like to have spawn in my custom box, anyone know the correct class names for each object below?

Ive looked everywhere but the dayz class names seem to be the hardest to find out.

 

For example I see the metal floors named  "metal_floor_kit" or "Metalfloor_DZ" or close to it, how is one to know witch is the correct?

 

 metal_floor_kit

 wood_ramp_kit

 cinder_wall_kit

 metal_panel_kit

 fuel_pump_kit

 m240_nest_kit

 wooden_shed_kit

 BagFenceRound_DZ_kit

 30m_plot_kit

 

Hope someone has some insite to my problem.

Thanks again.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...