Jump to content
Sign in to follow this  
spitfire007

Possible to add items to shipping/cargo containers ?

Recommended Posts

I am guessing not. But would like a definitive answer.

Is it possible to add cargo to shipping containers ?

Share this post


Link to post
Share on other sites

iirc, you can alter the following CE's to let objects carry things:

transportmaxbackpacks = 4;
transportmaxmagazines = 64;
transportmaxweapons = 12;

then alter/construct transportxxx classes:

class TransportMagazines {
class _xx_30Rnd_556x45_Stanag {
	magazine="30Rnd_556x45_Stanag";
	count=20;
};
class _xx_7Rnd_408_Mag {
	magazine="7Rnd_408_Mag";
	count=10;
};
};

Hope that helps

Share this post


Link to post
Share on other sites

You can always create a custom container/ammobox in a config, and then assign it a model that you want. I like to do it on objects that don't normally have an inventory.

Share this post


Link to post
Share on other sites

Thanks guys ...

I am still slightly confused by your answers.

@Das

What is iirc ? and CE's ?

@BadHabitz

I have no idea what you mean ?

Share this post


Link to post
Share on other sites

iirc = If I recall correctly

CE's = config entries.

I assume you mean altering the config; if you're planning it on doing by scripting then use addMagazineCargo and check the object can actually carry cargo etc.

BadHabitz meant taking an existing entry and changing the model = "blah\blah\model.p3d" path

Share this post


Link to post
Share on other sites

Ahhh....

Yes I plan on doing it via scripting.

So I would find the existing .p3d model and change that ?

I am not making an addon I just want it to work in a normal mission ?

Share this post


Link to post
Share on other sites

Ah right I thought you wanted to change the configs as it was in this forum.

If you want to script it, then you can't change the model (need to alter config to alter model).

By scripting do the usual

_container addMagazineCargoGlobal ["7Rnd_408_Mag",10];

_container addWeaponCargoGlobal ["SomeWeapon", 15];

etc.

As I say though, if it doesn't work, then it's because the config for the shipping container doesn't allow it.

Share this post


Link to post
Share on other sites

Thanks Das.

I want to fill a container with vehicles though... not ammo ?

Sorry for the confusion about the wrong forum. Oops.

Share this post


Link to post
Share on other sites

Ok, in that case you would probably need to create a system to keep track of vehicles.

If I were you, I would look at something like r3f logistics, or igiLoad and see how they did it.

I'm guessing that they save the vehicle data as a variable to the cargo object, then retrieve it and apply it to a newly spawned vehicle when they want to get the vehicle out of the container.

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  

×