Jump to content
Sign in to follow this  
zyg0tic

I'm trying to add medikits or repair kits to containers but it isn't working.

Recommended Posts

Okay so I've tried adding medikits, repair kits and also suppressors to ammo and supply box containers. It doesn't work.

Here is what I'm using in the init for the container.

this allowDamage false;

this enablesimulation false;

clearWeaponCargoGlobal this;

clearMagazineCargoGlobal this;

clearItemCargoGlobal this;

clearBackpackCargoGlobal this;

this additemcargo ["Item_ToolKit", 1];

this additemcargo ["Item_Medikit", 1];

this additemcargo ["Item_muzzle_snds_L", 5];

this additemcargo ["Item_muzzle_snds_acp", 5];

this additemcargo ["Item_optic_MRD", 5];

I've successfully added first aid kits and magazines to the same types of containers so I'm stumped as to why those items aren't working.

Share this post


Link to post
Share on other sites
If you're clearing using Global, then you should add using it as well https://community.bistudio.com/wiki/addItemCargoGlobal

Not sure if that's going to fix the issue though

Didnt work for medikit using

this addItemCargoGlobal ["Item_Medikit", 1]

It did work for the example item given on that wiki link

addItemCargoGlobal ["optic_ARCO", 10]

Share this post


Link to post
Share on other sites
Didnt work for medikit using

this addItemCargoGlobal ["Item_Medikit", 1]

It did work for the example item given on that wiki link

addItemCargoGlobal ["optic_ARCO", 10]

this addItemCargoGlobal ["Medikit", 1]

Should also be the same for the others. The class names don't have 'Item_' in them.

https://community.bistudio.com/wiki/Arma_3_CfgWeapons_Items

Share this post


Link to post
Share on other sites

this enablesimulation false; 

I would suggest to not use this in an ammobox.

It can cause issues with players not able to take things out of the box. That's just my experience with it.

Share this post


Link to post
Share on other sites

Thanks!

Tried with this

this allowDamage false;

clearWeaponCargoGlobal this;

clearMagazineCargoGlobal this;

clearItemCargoGlobal this;

this addItemCargoGlobal ["Medikit", 1]

It worked! Now I move onto the next million things Im stumped about :)

Share this post


Link to post
Share on other sites

If you have questions, don't hesitate to ask here ;)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×