Jump to content
Sign in to follow this  
wld427

Tire dammages

Recommended Posts

Trying to get the individual tires on our VEC to be destroyable..... having some difficulties......

can anyone help save my sanity?

http://pastebin.com/m6ddcdd39

#define TEast 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

class CfgPatches
{
class PRACS_VEC
   	{
     		units[] = {PRACS_VEC};
	requiredVersion = 1.0;
	VehicleClass = "Armored";
};


};

#include <cfgmagazine.h>
#include <cfgWeapons.h>
#include <cfgAmmo.h>



class CfgVehicles {
class All {};

class AllVehicles : All {};

class Ship : AllVehicles {};

class Land : AllVehicles {};

class LandVehicle : Land {
	class NewTurret;	// External class reference
	class ViewOptics;	// External class reference
	class ViewPilot;	// External class reference
};

class Car : LandVehicle {
	class Turrets;	// External class reference
	class MainTurret;	// External class reference
	class ViewGunner;	// External class reference
};

class Tank : LandVehicle {
	class CommanderOptics;	// External class reference
};

class StrykerBase : Car {};
class PRACS_VEC : StrykerBase {
	side = TGuerrila;
	scope = public;
	model = "\PRACS_LAV\PRACS_VEC";
	displayName = "VEC-25 M1 (RACS)";
	vehicleClass = "Armored";
	picture = "\PRACS_LAV\tex\VEC25ico1_ca.paa";
	Icon = "\PRACS_LAV\tex\icomap_vec25_ca.paa";
	crew = "SoldierGcrew";
	maxSpeed = 110;	// max speed on level road, km/h
	armor = 160;
	fuelCapacity = 340;
	damageResistance = 0.0179;
	accuracy = 0.3;	// accuracy needed to recognize type of this target
	hasCommander = true;
	commanderCanSee = 31;
	gunnerCanSee = 4+8+16;
	selectionFireAnim = "zasleh";
	transportSoldier = 2;
	memoryPointsGetInDriver = "pos_driver";
	memoryPointsGetInDriverDir = "pos_driver_dir";
	memoryPointsGetInCommander = "pos_commander";
	memoryPointsGetInCommanderDir = "pos_commander_dir";
	memoryPointsGetInGunner = "pos_gunner";
	memoryPointsGetInGunnerDir = "pos_gunner_dir"; 
	memoryPointsGetInCargo = "pos_cargo";
	memoryPointsGetInCargoDir = "pos_cargo_dir";
	memoryPointsGetInCoDriver = "pos_codriver";
	memoryPointsGetInCoDriverDir = "pos_codriver_dir";
	memoryPointSupply = "supply";
	driverOpticsModel = "\ca\Tracked\optika_tank_driver";

	class Library {
		libTextDesc = "Spanish Supplied VEC-25. Used as light APC and scout vehicle by RACS.";
	};

	class HitLFWheel {
		armor = 0.2;
		material = -1;
		name = "levy predni";
		visual = "levy predni";
		passThrough = 0;
	};

	class HitRFWheel {
		armor = 0.2;
		material = -1;
		name = "pravy predni";
		visual = "pravy predni";
		passThrough = 0;
	};

	class HitLF2Wheel {
		armor = 0.2;
		material = -1;
		name = "levy dalsi";
		visual = "levy dalsi";
		passThrough = 0;
	};

	class HitRF2Wheel {
		armor = 0.2;
		material = -1;
		name = "pravy dalsi";
		visual = "pravy dalsi";
		passThrough = 0;
	};

	class HitLMWheel {
		armor = 0.2;
		material = -1;
		name = "levy prostredni";
		visual = "levy prostredni";
		passThrough = 0;
	};

	class HitRMWheel {
		armor = 0.2;
		material = -1;
		name = "pravy prostredni";
		visual = "pravy prostredni";
		passThrough = 0;
	};

	class HitLBWheel {
		armor = 0.2;
		material = -1;
		name = "levy zadni";
		visual = "levy zadni";
		passThrough = 0;
	};

	class HitRBWheel {
		armor = 0.2;
		material = -1;
		name = "pravy zadni";
		visual = "pravy zadni";
		passThrough = 0;
	};

	class Reflectors
	{
		class Left
		{
			color[] = {0.9, 0.8, 0.8, 1.0};
			ambient[] = {0.1, 0.1, 0.1, 1.0};
			position = "Light_1_1_source";
			direction = "Light_1_1_target";
		    hitpoint = "Light_1_1";
			selection = "Light_1_1";
			size = 0.5;
			brightness =0.5;
		};
		class Right
		{
			color[] = {0.9, 0.8, 0.8, 1.0};
			ambient[] = {0.1, 0.1, 0.1, 1.0};
			position = "Light_1_2_source";
			direction = "Light_1_2_target";
			hitpoint = "Light_1_2";
			selection = "Light_1_2";
			size = 0.5;
			brightness = 0.5;
		};
	};
	dammageHalf[]=
	{
		"\ca\wheeled\data\jepp4x4_glass.paa","\ca\wheeled\data\jepp4x4_glassB.paa",
		"\ca\wheeled\data\jeep_kab_sklo1.paa","\ca\wheeled\data\jeep_kab_sklo1B.paa",
		"\ca\wheeled\data\jeep_kab_sklo2.paa","\ca\wheeled\data\jeep_kab_sklo2B.paa",
		"\ca\wheeled\data\scud_sklo.paa","\ca\wheeled\data\scud_skloB.paa",
		"\ca\wheeled\data\scud_sklo2.paa","\ca\wheeled\data\scud_sklo2B.paa",
		"\ca\wheeled\data\scud_sklo3.paa","\ca\wheeled\data\scud_sklo3B.paa",
		"\ca\wheeled\data\scud_sklo4.paa","\ca\wheeled\data\scud_sklo4B.paa"
	};
	dammageFull[]=
	{
		"\ca\wheeled\data\jepp4x4_glass.paa","\ca\wheeled\data\jepp4x4_glassB.paa",
		"\ca\wheeled\data\jeep_kab_sklo1.paa","\ca\wheeled\data\jeep_kab_sklo1B.paa",
		"\ca\wheeled\data\jeep_kab_sklo2.paa","\ca\wheeled\data\jeep_kab_sklo2B.paa",
		"\ca\wheeled\data\scud_sklo.paa","\ca\wheeled\data\scud_skloB.paa",
		"\ca\wheeled\data\scud_sklo2.paa","\ca\wheeled\data\scud_sklo2B.paa",
		"\ca\wheeled\data\scud_sklo3.paa","\ca\wheeled\data\scud_sklo3B.paa",
		"\ca\wheeled\data\scud_sklo4.paa","\ca\wheeled\data\scud_sklo4B.paa"
	};
	class Damage {
		tex[] = {};
		mat[] = {



			"PRACS_LAV\tex\alante.rvmat",
			"PRACS_LAV\tex\alante.rvmat",
			"ca\tracked\data\walls_destruct.rvmat",
			"PRACS_LAV\tex\arriba.rvmat",
			"PRACS_LAV\tex\arriba.rvmat",
			"ca\tracked\data\walls_destruct.rvmat",
			"PRACS_LAV\tex\atras.rvmat",
			"PRACS_LAV\tex\atras.rvmat",
			"ca\tracked\data\walls_destruct.rvmat",
			"PRACS_LAV\tex\despieze.rvmat",
			"PRACS_LAV\tex\despieze.rvmat",
			"ca\tracked\data\walls_destruct.rvmat",
			"PRACS_LAV\tex\despieze2.rvmat",
			"PRACS_LAV\tex\despieze2.rvmat",
			"ca\tracked\data\walls_destruct.rvmat",
			"PRACS_LAV\tex\goma.rvmat",
			"PRACS_LAV\tex\goma.rvmat",
			"ca\tracked\data\walls_destruct.rvmat",
			"PRACS_LAV\tex\interior1.rvmat",
			"PRACS_LAV\tex\interior1.rvmat",
			"ca\tracked\data\walls_destruct.rvmat",
			"PRACS_LAV\tex\interior2.rvmat",
			"PRACS_LAV\tex\interior2.rvmat",
			"ca\tracked\data\walls_destruct.rvmat",
			"PRACS_LAV\tex\lado.rvmat",
			"PRACS_LAV\tex\lado.rvmat",
			"ca\tracked\data\walls_destruct.rvmat",
			"PRACS_LAV\tex\lado_i.rvmat",
			"PRACS_LAV\tex\lado_i.rvmat",
			"ca\tracked\data\walls_destruct.rvmat",
			"PRACS_LAV\tex\rueda.rvmat",
			"PRACS_LAV\tex\rueda.rvmat",
			"ca\tracked\data\walls_destruct.rvmat",
			"PRACS_LAV\tex\vac_in.rvmat",
			"PRACS_LAV\tex\vac_in.rvmat",
			"ca\tracked\data\walls_destruct.rvmat",
			"ca\wheeled\data\detailmapy\stryker_icv_body2.rvmat",
			"ca\wheeled\data\detailmapy\stryker_icv_body2.rvmat",
			"ca\wheeled\data\detailmapy\stryker_icv_body2_destruct.rvmat"

		};
	};


	class Turrets : Turrets {
		class MainTurret : MainTurret {
			body = "mainTurret";
			gun = "mainGun";
			gunnerAction = "Stryker_GunnerOut";
			gunnerInAction = "Stryker_Gunner";
			gunBeg = "gun_muzzle";	// endpoint of the gun
			gunEnd = "gun_chamber";	// chamber of the gun
			memoryPointsGetInGunner = "pos_gunner";
			memoryPointsGetInGunnerDir = "pos_gunner_dir";
			memoryPointGun = "machinegun";
			selectionFireAnim = "zasleh";
			gunnerForceOptics = false;
			outGunnerMayFire = false;
			viewGunnerInExternal = true;
			memoryPointGunnerOptics = "gunnerview";
			gunnerOpticsModel = "\PRACS_LAV\VEC25GNRoptic";
			memoryPointGunnerOutOptics = "";
			gunnerOutOpticsModel = "";
			gunnerUsesPilotView = false;
			hasGunner = true;
			commanding = 1;
			castGunnerShadow = true;
			minElev = -10;
			maxElev = 50;
			minTurn = -360;
			maxTurn = 360;
			weapons[] = {"M240_VEH","PRACS_20mm_M24A2"};
			magazines[] = {"PRACS_M24A2_25mm_APX200","PRACS_M24A2_25mm_HEX200","1200Rnd_762x51_M240"};

			class ViewGunner {
				initAngleX = 0;
				minAngleX = -30;
				maxAngleX = 30;
				initAngleY = 0;
				minAngleY = -100;
				maxAngleY = 100;
				initFov = 0.42;
				minFov = 0.22;
				maxFov = 0.64;
			};

			class ViewOptics {
				initAngleX = 5;
				minAngleX = -30;
				maxAngleX = 30;
				initAngleY = 0;
				minAngleY = 0;
				maxAngleY = 0;
				initFov = 0.22;
				minFov = 0.0875;
				maxFov = 0.42;
			};
		};

		class CommanderOptics : NewTurret {
			proxyType = "CPCommander";
			proxyIndex = 1;
			gunnerName = $STR_POSITION_COMMANDER;
			gunnerAction = "Stryker_GunnerOut";
			gunnerInAction = "Stryker_Gunner";
			primaryGunner = 0;
			primaryObserver = 1;
			body = "obsTurret";
			gun = "obsGun";
			animationSourceBody = "obsTurret";
			animationSourceGun = "obsGun";
			animationSourceHatch = "hatchCommander";
			soundServo[] = {"", db-50, 1.0};
			gunBeg = "";	// endpoint of the gun
			gunEnd = "";	// chamber of the gun
			minElev = -4;
			maxElev = 10;
			initElev = 0;
			minTurn = -45;
			maxTurn = 45;
			initTurn = 0;
			commanding = 2;
			outGunnerMayFire = false;
			inGunnerMayFire = false;
			viewGunnerInExternal = true;
			gunnerUsesPilotView = false;
			gunnerForceOptics = false;
			gunnerOpticsModel = "\PRACS_LAV\VEC25CMDoptic";
			gunnerOutOpticsModel = "\ca\Weapons\optika_empty";
			gunnerOutOpticsColor[] = {0, 0, 0, 1};
			gunnerOutForceOptics = 0;
			gunnerOutOpticsShowCursor = 0;
			memoryPointGunnerOutOptics = "commander_weapon_view";
			memoryPointGunnerOptics = "commanderview";
			memoryPointsGetInGunner = "pos_commander";
			memoryPointsGetInGunnerDir = "pos_commander_dir";
			memoryPointGun = "cmdgun";
			selectionFireAnim = "zasleh_1";

			class ViewOptics {
				initAngleX = 0;
				minAngleX = -4;
				maxAngleX = 10;
				initAngleY = 0;
				minAngleY = -45;
				maxAngleY = 45;
				initFov = 0.42;
				minFov = 0.22;
				maxFov = 0.64;
			};

			class ViewGunner {
				initAngleX = 0;
				minAngleX = -30;
				maxAngleX = 30;
				initAngleY = 0;
				minAngleY = -150;
				maxAngleY = 120;
				initFov = 0.42;
				minFov = 0.22;
				maxFov = 0.64;
			};
		};
	};


	class Exhausts {
		class Exhaust1 {
			position = "vyfuk start";
			direction = "vyfuk konec";
			effect = "ExhaustsEffect";
			};		
	};

};

Share this post


Link to post
Share on other sites
Guest RKSL-Rock

Do you have a hitpoint lod? with all the points properly named as defined in you config?

Share this post


Link to post
Share on other sites

The BI samples include correct ural model including the hitpoints for the tires (to my very own surpise, the hitpoints are named levy/pravy predni/zadni tlumic...).

For config's purposes, I used the Truck5tMG as base class for my wheeled vehicles, so I guess your Damagetextures, HitLFWheel etc. are correct. The model.cfg shows the corresponding sections:

class CfgModels
{
   class Default
   {
       sectionsInherit="";
       sections[] = {};
       skeletonName = "";
   };	
class Car: Default
{
	sectionsInherit="Default";
	sections[]=
	{
...
		"levy predni",
		"levy prostredni",
		"levy zadni",
		"pravy predni",
		"pravy prostredni",
		"pravy zadni",
...
	};

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  

×