Jump to content

Photo
- - - - -

How to make config.cpp fpr static models?


  • Please log in to reply
1 reply to this topic
Matteo1944
Matteo1944

    Staff Sergeant

  • Members
  • 234 posts

#1

Posted 16 February 2012 - 20:54

Can someone show me how to write config.cpp for my ww2 beach obstacles...I've already made models,but config is problem...
"A single death is a tragedy; a million deaths is a statistic."
-Joseph Stalin
...

sanctuary
sanctuary

    First Lieutenant

  • Members
  • 5163 posts

#2

Posted 17 February 2012 - 01:51

Try this, of course adjust accordingly to your model names, class names, armor value etc...



// some basic defines
#define TWest 0
#define TWest 1
#define TGuerrila 2
#define TCivilian 3
#define TSideUnknown 4
#define TEnemy 5
#define TFriendly 6
#define TLogic 7

#define true 1
#define false 0

// type scope
#define private 0
#define protected 1
#define public 2

#define WeaponNoSlot				0// dummy weapons
#define WeaponSlotPrimary		1// primary weapons
#define WeaponSlotSecondary	16// secondary weapons
#define WeaponSlotItem			256// items
#define WeaponSlotBinocular	4096// binocular
#define WeaponHardMounted		65536

class CfgPatches
	{

	class YourAddonName
		{
		units[]={"YourUnitClassname"};
		weapons[]={};
		requiredAddons[]= {"BIS_Resistance"};
		requiredVersion=1.85;
		};
	};

class CfgModels
	{

	class Default
		{
		sections[]={};
		sectionsInherit="";
		};

	class YourModelNameWithoutP3DinTheEnd:Default {};

	};

class CfgVehicles
	{

	class All
		{
		};

	class Static:All
		{
		};

	class Building:Static
		{
		};

	class NonStrategic:Building
		{
		};

	class Fence:NonStrategic
		{
		};

	class FenceWood:Fence
		{
		};

	class YourUnitClassname:FenceWood
		{
		model="\YourPBOName\YourModelNameWithoutP3DinTheEnd.p3d";
		vehicleClass="Whatever Category Name in the Side Empty list";
		side=4;
		displayName="Whatever is the name of the object you want to see in the Side Empty list";
		mapSize=2.4;
		accuracy=1000;
		armor=400;
		icon="\YourPBOName\TexturenameFortheobjectIcon.paa";
		nameSound="building";
		simulation="house";
		};

	};