Jump to content
Sign in to follow this  
Tankbuster

Config based addon

Recommended Posts

In this thread I was grateful to get some advice on the use of the shipping containers in the game, but it seems the best way to do this is by a config addon, so I thought I'd ask here. It's simulation is normally a house and I was hoping simply changing that to 'thing' would give it proper physics and all, but it doesn't.

With the below config, I get lots of missing config.bin entries. If I ignore them the container seems to have no mass and will happily float away. Looks most odd.

Anyway, I don't usually ask others to do my work, but this part of my project is overdue now so if anyone would be good enough to finish this off for me, I'd be most grateful. There's little or no documentation or help stuff for writing cpp.

class CfgPatches 
{
   class TKY_CONTAINER {
       units[]={"TKY_CONTAINER_OPEN"};
       requiredVersion = 0.1;
       requiredAddons[]={"CAMisc_E"};
   };
};

class CfgVehicles 
{
   class Land_Misc_Cargo1Eo_EP1;

   class TKY_CONTAINER_OPEN : Land_Misc_Cargo1Eo_EP1
   {
       simulation = "thing";
       displayname = "Packed FOB";
       scope = 2;
   };


};

Share this post


Link to post
Share on other sites

HTH did I mess that?

Thanks Dawg, I'll check it out.

Share this post


Link to post
Share on other sites

class CfgPatches 
{
   class TKY_CONTAINER {
       units[]={"TKY_CONTAINER_OPEN"};
       requiredVersion = 0.1;
       requiredAddons[]={"CAMisc_E"};
   };
};

class CfgVehicles 
{
   class thing;

   class TKY_CONTAINER_OPEN : thing
   {
       model = "EPWHATEVERCONTAINERMODEL";
       displayname = "Packed FOB";
       scope = 2;
   };


};

i used Ca\buildings2\Misc_Cargo\Misc_Cargo1E

or if you want to add the parameters to the existing class with no inheritence

class thing from A2

class Thing: All
{
	reversed = 0;
	animated = 0;
	icon = "iconThing";
	vehicleClass = "Objects";
	displayName = "Unknown";
	accuracy = 0.005;
	simulation = "thing";
	side = 3;
	weight = 0;
	class InventoryPlacements {};
	submerged = 0;
	submergeSpeed = 0;
	airFriction2[] =
	{
		0.01,
		0.01,
		0.01
	};
	airFriction1[] =
	{
		0.01,
		0.01,
		0.01
	};
	airFriction0[] =
	{
		0.01,
		0.01,
		0.01
	};
	airRotation = 0;
	gravityFactor = 1;
	timeToLive = 1e+010;
	disappearAtContact = 0;
	hasDriver = 0;
	picture = "pictureThing";
	weapons[] = {};
	magazines[] = {};
	minHeight = 0.1;
	avgHeight = 0.2;
	maxHeight = 0.4;
	type = 1;
	threat[] =
	{
		0,
		0,
		0
	};
	maxSpeed = 0;
	irTarget = 0;
	class SpeechVariants
	{
		class Default
		{
			speechSingular[] =
			{
				"obj_object"
			};
			speechPlural[] =
			{
				"obj_objects"
			};
		};
		class EN: Default {};
		class CZ
		{
			speechSingular[] =
			{
				"obj_object_CZ"
			};
			speechPlural[] =
			{
				"obj_objects_CZ"
			};
		};
		class CZ_Akuzativ
		{
			speechSingular[] =
			{
				"obj_object_CZ4P"
			};
			speechPlural[] =
			{
				"obj_objects_CZ4P"
			};
		};
		class RU
		{
			speechSingular[] =
			{
				"obj_object_RU"
			};
			speechPlural[] =
			{
				"obj_objects_RU"
			};
		};
	};
	TextPlural = "Objects";
	TextSingular = "Object";
	nameSound = "obj_object";
};

Fun parameters:

airFriction2[] =

airFriction1[] =

airFriction0[] =

airRotation =

gravityFactor =

Share this post


Link to post
Share on other sites

Aha. Now we're making progress.

See how it doesn't fall to the ground when released by the helo.

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  

×