Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
shunter101

filling ammo crates

Recommended Posts

I am currently working on a persistent mission and part of it involves having crates filled with the different items (uniforms, guns, misc objects, ect) that they may need for whatever mission they have. Currently i am trying to use MCC's crate filler to add the text to the execute area, but its kind of a toss up whether it will take after i come back to work on the project. Here is an example, during one session i build a little base and added the crates and filled them with the necessary objects they would need, i saved the mission thru mcc, copy and pasted it to the sqm file, tabbed back into the mission and saved and exited. Now when i came back to work on it again everything was fine so i worked on another base and did the same thing as the first time, now when i log back in for a 3rd session the crates from my 1st base are empty and the one from my second are full. So i guess my question is there something im doing wrong during the saving process, or am i going about the crate filling process wrong? 

 

Any help would be greatly appreciated.

Share this post


Link to post
Share on other sites

Here's what I use to fill a crate up with medical items from ACE3 items. 

ACE3: https://forums.bistudio.com/topic/180091-ace3-a-collaborative-merger-between-agm-cse-and-ace/

 

1) In the editor, place an empty Support [NATO] Box.

 

2) In the initialization field place:


if (isServer) then {
clearItemCargo this;
ClearWeaponCargo this;
ClearMagazineCargo this;
this additemcargo ["ACE_fieldDressing", 100];
this additemcargo ["ACE_morphine", 20];
this additemcargo ["ACE_epinephrine", 20];
this additemcargo ["ACE_bloodIV_500", 10];
this additemcargo ["ACE_BodyBag", 10];
this additemcargo ["ACE_CableTie", 10];
this additemcargo ["ACE_EarPlug", 10];
};

Or you can substitute medical items with weapons or magazines by finding their class names and using any of the following:

this addmagazinecargo ["CLASS_NAME_HERE", X]

this addweaponcargo ["CLASS_NAME_HERE", X]

Keep in mind, this will ONLY work if you self host. On a dedicated machine this DOES NOT work for reasons I have yet to figure out (Psss...if anyone can tell me how that'll be great)

Share this post


Link to post
Share on other sites

It doesn't work on a dedicated server because that command has a local effect. It is filling up the box but only on the server, the results are not being broadcast to connected players. Use addItemCargoGlobal instead. 

Share this post


Link to post
Share on other sites

You can spawn crates ingame, i.e as resupply drop event.

You can specify different  sets of stuff for different crates and (spawn , or add  in editor) proper one in proper location.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×