Jump to content
Sign in to follow this  
Karrr

Custom Vehicle Does Not Take Damage

Recommended Posts

I've made my four seated Hilux and it's almost completely done! (Hurray!) All I have to do is get the damage to work on it, I've been tweaking it around a lot and I've found that if I use the original Hilux from Arma 2 (\ca\Wheeled\hilux1_civil_1_open) as the model instead of my model (\Kars_Hilux\Model\Kars_Hilux.p3d) when I shoot the vehicle (Original Hilux Model) It has sparks and tires pop. But when I use my model when I shoot it nothing breaks on it, when bullets hit the vehicle it puffs up dirt and it's basically invincible. So what I'm asking is how do I mess with the damage on the model? Any help is greatly appreciated!!

Note: I used the sample Hilux model

Share this post


Link to post
Share on other sites

Your fireGeoLod requires penetration rvmats that reference Bisurf files, and the damageable locations require a hitpoint lod.

http://community.bistudio.com/wiki/LOD#Fire_Geometry

http://community.bistudio.com/wiki/LOD#Hit-points

http://community.bistudio.com/wiki/Damage

http://community.bistudio.com/wiki/ArmA:_RVMAT#Surface_physical_properties

The penetration rvmats should be in your armaroot\data\penetration\ folder. Assign an appropriate one to different surfaces of your firegeolod. Check out the example models for valid hitpoints and firegeo lod setups.

Share this post


Link to post
Share on other sites

And you always can take reference from ArmA Sample Models

Share this post


Link to post
Share on other sites
Your fireGeoLod requires penetration rvmats that reference Bisurf files, and the damageable locations require a hitpoint lod.

http://community.bistudio.com/wiki/LOD#Fire_Geometry

http://community.bistudio.com/wiki/LOD#Hit-points

http://community.bistudio.com/wiki/Damage

http://community.bistudio.com/wiki/ArmA:_RVMAT#Surface_physical_properties

The penetration rvmats should be in your armaroot\data\penetration\ folder. Assign an appropriate one to different surfaces of your firegeolod. Check out the example models for valid hitpoints and firegeo lod setups.

I used the sample Hilux and stretched the back of it and set the seats in and the proxy's for the seats. Then alined all of the LOD's accordingly to my edited Hilux. Where do I apply the rvmat files?

Edited by Karrr
Quote

Share this post


Link to post
Share on other sites
To the faces of the components in your firegeolod.

Do I apply it as I would apply a texture and to all of the faces? Also can you give me the direct path to the rvmat file I'm supposed to apply?

Edited by Karrr
Found the penetration folder

Share this post


Link to post
Share on other sites

As a material to the faces that would react to the bullets in the way described in the rvmat filename.

Glass rvmat on the glass faces, and metal rvmats on the metal faces.

Share this post


Link to post
Share on other sites
As a material to the faces that would react to the bullets in the way described in the rvmat filename.

Glass rvmat on the glass faces, and metal rvmats on the metal faces.

So now I got that working but the vehicle still isn't taking damage, I can hear the tires deflating and all but they don't actually pop/take damage.

Share this post


Link to post
Share on other sites

You need named hitpoints in the hitpoints lod and hitpoints defined in your config.cpp

Share this post


Link to post
Share on other sites
You need named hitpoints in the hitpoints lod and hitpoints defined in your config.cpp

I have this as my config.cpp

#include "basicdefines.hpp"
#include "model.cfg"
class CfgPatches
{
class Kars_Hilux
{
units[] = {"Kars_Hilux"};
weapons[] = {};
requiredVersion = 1.0;
requiredAddons[] = {};
};
};
class CfgVehicles {
class HMMWV;
class Kars_Hilux: HMMWV

{
	scope = public;
	hasGunner = 0;
	maxSpeed=160;
	acceleration = 9;
	side=TCivilian;
	model="\Kars_Hilux\Model\Kars_Hilux.p3d";
	picture="\Ca\wheeled\data\ico\hilux1_civil_3_open_CA.paa";
	Icon="\Ca\wheeled\data\map_ico\icomap_hilux_CA.paa";
	mapSize = 7;
	nameSound="offroad";
	displayName= "Kars Hilux";
	transportSoldier = 3;
	typicalCargo[]={Civilian};
	driverAction= Hilux_Driver;

	soundEngine[]={\ca\wheeled\Data\Sound\Hilux_engine1,db-20,0.8};
	soundGear[]={\ca\wheeled\Data\Sound\shifter_v3,db-65,1};
	SoundGetIn[]={\ca\wheeled\Data\Sound\Humvee_DoorOpenClose,db-45,1};
	SoundGetOut[]={\ca\wheeled\Data\Sound\Humvee_DoorOpenClose,db-50,1};

	class HitEngine {armor=0.4;material=60;name="motor";visual="motor";passThrough=1;};

	class HitRGlass {armor=0.3;material=-1;name="sklo predni P";passThrough=0;};
	class HitLGlass {armor=0.3;material=-1;name="sklo predni L";passThrough=0;};

	class HitBody {armor=1;material=51;name="NEkaroserie";visual="karoserie";passThrough=1;};
	class HitFuel {armor=0.3;material=51;name="palivo";passThrough=1;};

	class HitLFWheel {armor=0.15;material=-1;name="Levy predni tlumic";visual="Levy predni";passThrough=0;};
	class HitRFWheel {armor=0.15;material=-1;name="Pravy predni tlumic";visual="Pravy predni";passThrough=0;};


	class HitLBWheel {armor=0.15;material=-1;name="Levy zadni tlumic";visual="Levy zadni";passThrough=0;};
	class HitRBWheel {armor=0.15;material=-1;name="Pravy zadni tlumic";visual="Pravy zadni";passThrough=0;};

	class Turrets {};
	dammageHalf[]=
	{
		\ca\wheeled\data\coyota_skla.paa, \ca\wheeled\data\coyota_sklabr1_CA.paa,
		\ca\wheeled\data\coyota_skla.paa, \ca\wheeled\data\coyota_sklabr1_CA.paa
	};
	dammageFull[]=
	{
		\ca\wheeled\data\coyota_skla.paa, \ca\wheeled\data\coyota_sklabr2_CA.paa,
		\ca\wheeled\data\coyota_skla.paa, \ca\wheeled\data\coyota_sklabr2_CA.paa
	};
	class Damage
	{
		tex[]={};
		mat[]={
			"kars_hilux\textures for hilux\coyota_trup1.rvmat",
			"kars_hilux\textures for hilux\coyota_trup1.rvmat",
			"kars_hilux\textures for hilux\coyota_trup1_destruct.rvmat",
			"kars_hilux\textures for hilux\coyota_kola.rvmat",
			"kars_hilux\textures for hilux\coyota_kola.rvmat",
			"kars_hilux\textures for hilux\coyota_kola_destruct.rvmat",
			"kars_hilux\textures for hilux\coyota_interier.rvmat",
			"kars_hilux\textures for hilux\coyota_interier.rvmat",
			"kars_hilux\textures for hilux\coyota_interier_destruct.rvmat"
		};
	};
};
};

And it isn't working, any ideas?

Edited by Karrr
Quote

Share this post


Link to post
Share on other sites

Your hitpoint named selections do not correspond to the hitpoints classes you're inheriting from the humvee class.

Share this post


Link to post
Share on other sites
Your hitpoint named selections do not correspond to the hitpoints classes you're inheriting from the humvee class.

The Humvee's wheel hitpoints are pravy predni tlumic, levy predni tlumic, pravy zadni tlumic, and levy zadni tlumic as I have in the config.

 
#include "basicdefines.hpp"
#include "model.cfg"
class CfgPatches
{
class Kars_Hilux
{
units[] = {"Kars_Hilux"};
weapons[] = {};
requiredVersion = 1.0;
requiredAddons[] = {};
};
};
class CfgVehicles {
class HMMWV;
class Kars_Hilux: HMMWV

{
	scope = public;
	hasGunner = 0;
	maxSpeed=160;
	acceleration = 9;
	side=TCivilian;
	model="\Kars_Hilux\Model\Kars_Hilux.p3d";
	picture="\Ca\wheeled\data\ico\hilux1_civil_3_open_CA.paa";
	Icon="\Ca\wheeled\data\map_ico\icomap_hilux_CA.paa";
	mapSize = 7;
	nameSound="offroad";
	displayName= "Kars Hilux";
	transportSoldier = 3;
	typicalCargo[]={Civilian};
	driverAction= Hilux_Driver;

	soundEngine[]={\ca\wheeled\Data\Sound\Hilux_engine1,db-20,0.8};
	soundGear[]={\ca\wheeled\Data\Sound\shifter_v3,db-65,1};
	SoundGetIn[]={\ca\wheeled\Data\Sound\Humvee_DoorOpenClose,db-45,1};
	SoundGetOut[]={\ca\wheeled\Data\Sound\Humvee_DoorOpenClose,db-50,1};


//		class PlateInfos {name="spz"; /*font<=fontPlate;*/ color[]={0,0,0,0.75};}
	class HitEngine {armor=0.4;material=60;name="motor";visual="motor";passThrough=1;};

	class HitRGlass {armor=0.3;material=-1;name="sklo predni P";passThrough=0;};
	class HitLGlass {armor=0.3;material=-1;name="sklo predni L";passThrough=0;};

	class HitBody {armor=1;material=51;name="NEkaroserie";visual="karoserie";passThrough=1;}; //disabled points from models
	class HitFuel {armor=0.3;material=51;name="palivo";passThrough=1;};

	class HitLFWheel {armor=0.15;material=-1;name="levy predni tlumic";visual="Levy predni";passThrough=0;};
	class HitRFWheel {armor=0.15;material=-1;name="pravy predni tlumic";visual="Pravy predni";passThrough=0;};


	class HitLBWheel {armor=0.15;material=-1;name="levy zadni tlumic";visual="Levy zadni";passThrough=0;};
	class HitRBWheel {armor=0.15;material=-1;name="pravy zadni tlumic";visual="Pravy zadni";passThrough=0;};

	dammageHalf[]=
	{
		\ca\wheeled\data\coyota_skla.paa, \ca\wheeled\data\coyota_sklabr1_CA.paa,
		\ca\wheeled\data\coyota_skla.paa, \ca\wheeled\data\coyota_sklabr1_CA.paa
	};
	dammageFull[]=
	{
		\ca\wheeled\data\coyota_skla.paa, \ca\wheeled\data\coyota_sklabr2_CA.paa,
		\ca\wheeled\data\coyota_skla.paa, \ca\wheeled\data\coyota_sklabr2_CA.paa
	};
	class Damage
	{
		tex[]={};
		mat[]={
			"kars_hilux\textures for hilux\coyota_trup1.rvmat",
			"kars_hilux\textures for hilux\coyota_trup1.rvmat",
			"kars_hilux\textures for hilux\coyota_trup1_destruct.rvmat",
			"kars_hilux\textures for hilux\coyota_kola.rvmat",
			"kars_hilux\textures for hilux\coyota_kola.rvmat",
			"kars_hilux\textures for hilux\coyota_kola_destruct.rvmat",
			"kars_hilux\textures for hilux\coyota_interier.rvmat",
			"kars_hilux\textures for hilux\coyota_interier.rvmat",
			"kars_hilux\textures for hilux\coyota_interier_destruct.rvmat"
		};
	};
};
};

EDIT: I also changed the model to the original Hilux and the tires pop and all of that.

Edited by Karrr

Share this post


Link to post
Share on other sites
Your hitpoints classes aren't in class hitpoints.

I don't really know that much about configs and all I just started doing this around 5 days ago, can you give me an example of a class hitpoints from a config? Or just rewrite my code and paste it here. I would prefer an example so I can study it then change it accordingly to my vehicles requirements.

EDIT: The wheels are actually breaking but the wheels stay after they are popped? This is after I put:

class hitpoints

{

Code here

};

Edited by Karrr

Share this post


Link to post
Share on other sites

Yeah, now your hitpoints are working. To get the tires to change to destroyed wheel models you have to create an animation in your model.cfg to hide the wheels and unhide wheel proxies. In order to do that you may have to set up a skeleton heirarchy.

http://forums.bistudio.com/showthread.php?95087-Arma-2-track-and-tire-dammages&p=1594647&viewfull=1#post1594647

http://community.bistudio.com/wiki/Model_Config

Edited by Max Power

Share this post


Link to post
Share on other sites
Yeah, now your hitpoints are working. To get the tires to change to destroyed wheel models you have to create an animation in your model.cfg to hide the wheels and unhide wheel proxies. In order to do that you may have to set up a skeleton heirarchy.

http://forums.bistudio.com/showthread.php?95087-Arma-2-track-and-tire-dammages&p=1594647&viewfull=1#post1594647

http://community.bistudio.com/wiki/Model_Config

So this is my current model.cfg

class CfgSkeletons {
class Car; // External class reference

class Kars_HiluxBones : Car {
isDiscrete = 1;
skeletonInherit = "";
skeletonBones[] = {"pravy predni", "", "pravy dalsi", "", "pravy zadni", "", "pravy prostredni", "", "levy predni", "", "levy dalsi", "", "levy zadni", "", "levy prostredni", "", "dvere1", "", "ukaz_fuel", "", "ukaz_rpm", "", "ukaz_rychlo", "", "volant", ""};
};
};

class CfgModels {
class Car; // External class reference

class Kars_Hilux : Car {
sectionsInherit = "";
sections[] = {"n1", "n2", "n3", "n4", "n5", "n6", "pruh", "light_brake", "pravy predni", "pravy dalsi", "pravy zadni", "pravy prostredni", "levy predni", "levy dalsi", "levy zadni", "levy prostredni", "L svetlo", "P svetlo", "clan"};
skeletonName = "Kars_HiluxBones";

class Animations {

class Dvere1 {
type = "rotation";
source = "rpm";
selection = "dvere1";
axis = "osa_dvere1";
memory = 1;
//sourceAddress = "clamp";
minValue = 0;
maxValue = 0.1;
angle0 = 0;
angle1 = 0.58;
};

class Kars_HiluxFrontWheelR {
type = "rotationX";
source = "wheel";
selection = "pravy predni";
axis = "";
memory = 1;
sourceAddress = "loop";
minValue = 0;
maxValue = 1;
angle0 = 0;
angle1 = "rad -360";
};

class Kars_HiluxFrontWheelL : Kars_HiluxFrontWheelR {
selection = "levy predni";
};

class Kars_Hilux2FrontWheelL : Kars_HiluxFrontWheelR {
selection = "levy dalsi";
};

class Kars_Hilux2FrontWheelR : Kars_HiluxFrontWheelR {
selection = "pravy dalsi";
};

class Kars_Hilux2RearWheelR : Kars_HiluxFrontWheelR {
selection = "pravy prostredni";
};

class Kars_Hilux2RearWheelL : Kars_HiluxFrontWheelR {
selection = "levy prostredni";
};

class Kars_HiluxRearWheelR : Kars_HiluxFrontWheelR {
selection = "pravy zadni";
};

class Kars_HiluxRearWheelL : Kars_HiluxFrontWheelR {
selection = "levy zadni";
};

class Kars_HiluxFrontWheelRTurn {
type = "rotationY";
source = "drivingWheel";
selection = "pravy predni";
axis = "";
memory = 1;
sourceAddress = "clamp";
minValue = -1;
maxValue = 1;
angle0 = "rad 35";
angle1 = "rad -35";
};

class Kars_HiluxFrontWheelLTurn : Kars_HiluxFrontWheelRTurn {
selection = "levy predni";
};

class Kars_Hilux2FrontWheelRTurn : Kars_HiluxFrontWheelRTurn {
selection = "pravy dalsi";
};

class Kars_Hilux2FrontWheelLTurn : Kars_HiluxFrontWheelLTurn {
selection = "levy dalsi";
};

class Kars_HiluxDamperFrontWheelR {
type = "translationY";
source = "damper";
selection = "pravy predni";
axis = "";
memory = 1;
sourceAddress = "clamp";
minValue = 0;
maxValue = 1;
angle0 = 0;
angle1 = "35";
};

class Kars_HiluxDamperFrontWheelL : Kars_HiluxDamperFrontWheelR {
selection = "levy predni";
};

class Kars_Hilux2DamperFrontWheelL : Kars_HiluxDamperFrontWheelR {
selection = "levy dalsi";
};

class Kars_Hilux2DamperFrontWheelR : Kars_HiluxDamperFrontWheelR {
selection = "pravy dalsi";
};

class Kars_Hilux2DamperRearWheelR : Kars_HiluxDamperFrontWheelR {
selection = "pravy prostredni";
};

class Kars_Hilux2DamperRearWheelL : Kars_HiluxDamperFrontWheelR {
selection = "levy prostredni";
};

class Kars_HiluxDamperRearWheelR : Kars_HiluxDamperFrontWheelR {
selection = "pravy zadni";
};

class Kars_HiluxDamperRearWheelL : Kars_HiluxDamperFrontWheelR {
selection = "levy zadni";
};

class Kars_HiluxIndicatorSpeed
{
type="rotation";
source="speed";
selection="ukaz_rychlo";
axis="osa_rychlo";
memory="false";
animPeriod=0;
minValue=0;
maxValue="140 / 3.6";
angle0=0;
angle1="rad 280";
};

class Kars_HiluxIndicatorRPM
{
animPeriod=0;
type="rotation";
source="rpm";
selection="ukaz_rpm";
axis="osa_rpm";
memory=0;
minValue=0.000000;
maxValue=1.000000;
angle0=0.000000;
angle1=2.967060;
};

class Kars_HiluxDrivingWheel
{
type="rotation";
source="drivingWheel";
selection="volant";
begin="osaVolantZac";
end="osaVolantKon";
memory="false";
animPeriod=0;
minValue=-1;
maxValue=1;
angle0=-8;
angle1=8;
};
};
};
};

I don't exactly know what to add to edit or where to place the codes in the link. In the destruct code it refers to Selection = "wheel_L1_hide"; do I need to change wheel_L1 to levy predni tlumic? So what is wheel_L1_hide exactly?

EDIT: Going to bed get back to you tomorrow, thanks for all your time

Edited by Karrr

Share this post


Link to post
Share on other sites

Use whatever names you think are best, but you will probably want to make sure all of your names for things are consistent.

Wheel_L1_hide is the wheel model that gets hidden, first row from the front on the left (front left wheel). The latest vehicles have wheels named wheel_1_1_hide corresponding to side 1, row 1. These are just naming conventions.

The skeleton array in the model config is a hierarchy. If my shoulder was a root of a skeletal hierarchy, when I moved my shoulder, all other joints move as well. When I move my elbow, my wrist and fingers move as well, down and down the hierarchy. The skeleton is denoted as a list of bones and their parents.

"shoulder","",

Would indicate the shoulder is the first bone because it has no parent.

"shoulder","",

"elbow","shoulder",

"wrist","elbow",

"thumb1","wrist", //thumb

"thumb2","thumb1",

"indexfinger1",wrist", //indexfinger

"indexfinger2","indexfinger1",

"indexfinger3","indexfinger2",

Would be an example of how you describe a skeleton hierarchy of your shoulder to your hand and a couple of fingers.

http://community.bistudio.com/wiki/ArmA:_Howto_Model_Config

Share this post


Link to post
Share on other sites
Use whatever names you think are best, but you will probably want to make sure all of your names for things are consistent.

Wheel_L1_hide is the wheel model that gets hidden, first row from the front on the left (front left wheel). The latest vehicles have wheels named wheel_1_1_hide corresponding to side 1, row 1. These are just naming conventions.

The skeleton array in the model config is a hierarchy. If my shoulder was a root of a skeletal hierarchy, when I moved my shoulder, all other joints move as well. When I move my elbow, my wrist and fingers move as well, down and down the hierarchy. The skeleton is denoted as a list of bones and their parents.

"shoulder","",

Would indicate the shoulder is the first bone because it has no parent.

"shoulder","",

"elbow","shoulder",

"wrist","elbow",

"thumb1","wrist", //thumb

"thumb2","thumb1",

"indexfinger1",wrist", //indexfinger

"indexfinger2","indexfinger1",

"indexfinger3","indexfinger2",

Would be an example of how you describe a skeleton hierarchy of your shoulder to your hand and a couple of fingers.

http://community.bistudio.com/wiki/ArmA:_Howto_Model_Config

I'm still really puzzled, if you don't mind can you give me an example of another vehicles model.cfg with the class wheel_L1_destruct in it?

EDIT: I got the wheels to hide, It's challenging but I'm learning ;) Looking at the post now to get the vehicle to drop down when the wheel is gone.

EDIT2: After adding the unhide's the wheels don't show

 class CfgSkeletons {
class Car; // External class reference

class Kars_HiluxBones : Car {
isDiscrete = 1;
skeletonInherit = "";
skeletonBones[] = {"pravy predni", "", "pravy dalsi", "", "pravy zadni", "", "pravy prostredni", "", "levy predni", "", "levy dalsi", "", "levy zadni", "", "levy prostredni", "", "dvere1", "", "ukaz_fuel", "", "ukaz_rpm", "", "ukaz_rychlo", "", "volant", ""};
};
};

class CfgModels {
class Car; // External class reference

class Kars_Hilux : Car {
sectionsInherit = "";
sections[] = {"n1", "n2", "n3", "n4", "n5", "n6", "pruh", "light_brake", "pravy predni", "pravy dalsi", "pravy zadni", "pravy prostredni", "levy predni", "levy dalsi", "levy zadni", "levy prostredni", "L svetlo", "P svetlo", "clan"};
skeletonName = "Kars_HiluxBones";

class Animations {

class Dvere1 {
type = "rotation";
source = "rpm";
selection = "dvere1";
axis = "osa_dvere1";
memory = 1;
//sourceAddress = "clamp";
minValue = 0;
maxValue = 0.1;
angle0 = 0;
angle1 = 0.58;
};

class Kars_HiluxFrontWheelR {
type = "rotationX";
source = "wheel";
selection = "pravy predni";
axis = "";
memory = 1;
sourceAddress = "loop";
minValue = 0;
maxValue = 1;
angle0 = 0;
angle1 = "rad -360";
};

class Kars_HiluxFrontWheelL : Kars_HiluxFrontWheelR {
selection = "levy predni";
};

class Kars_Hilux2FrontWheelL : Kars_HiluxFrontWheelR {
selection = "levy dalsi";
};

class Kars_Hilux2FrontWheelR : Kars_HiluxFrontWheelR {
selection = "pravy dalsi";
};

class Kars_Hilux2RearWheelR : Kars_HiluxFrontWheelR {
selection = "pravy prostredni";
};

class Kars_Hilux2RearWheelL : Kars_HiluxFrontWheelR {
selection = "levy prostredni";
};

class Kars_HiluxRearWheelR : Kars_HiluxFrontWheelR {
selection = "pravy zadni";
};

class Kars_HiluxRearWheelL : Kars_HiluxFrontWheelR {
selection = "levy zadni";
};

class Kars_HiluxFrontWheelRTurn {
type = "rotationY";
source = "drivingWheel";
selection = "pravy predni";
axis = "";
memory = 1;
sourceAddress = "clamp";
minValue = -1;
maxValue = 1;
angle0 = "rad 35";
angle1 = "rad -35";
};

class Kars_HiluxFrontWheelLTurn : Kars_HiluxFrontWheelRTurn {
selection = "levy predni";
};

class Kars_Hilux2FrontWheelRTurn : Kars_HiluxFrontWheelRTurn {
selection = "pravy dalsi";
};

class Kars_Hilux2FrontWheelLTurn : Kars_HiluxFrontWheelLTurn {
selection = "levy dalsi";
};

class Kars_HiluxDamperFrontWheelR {
type = "translationY";
source = "damper";
selection = "pravy predni";
axis = "";
memory = 1;
sourceAddress = "clamp";
minValue = 0;
maxValue = 1;
angle0 = 0;
angle1 = "35";
};

class Kars_HiluxDamperFrontWheelL : Kars_HiluxDamperFrontWheelR {
selection = "levy predni";
};

class Kars_Hilux2DamperFrontWheelL : Kars_HiluxDamperFrontWheelR {
selection = "levy dalsi";
};

class Kars_Hilux2DamperFrontWheelR : Kars_HiluxDamperFrontWheelR {
selection = "pravy dalsi";
};

class Kars_Hilux2DamperRearWheelR : Kars_HiluxDamperFrontWheelR {
selection = "pravy prostredni";
};

class Kars_Hilux2DamperRearWheelL : Kars_HiluxDamperFrontWheelR {
selection = "levy prostredni";
};

class Kars_HiluxDamperRearWheelR : Kars_HiluxDamperFrontWheelR {
selection = "pravy zadni";
};

class Kars_HiluxDamperRearWheelL : Kars_HiluxDamperFrontWheelR {
selection = "levy zadni";
};

class Kars_HiluxIndicatorSpeed
{
type="rotation";
source="speed";
selection="ukaz_rychlo";
axis="osa_rychlo";
memory="false";
animPeriod=0;
minValue=0;
maxValue="140 / 3.6";
angle0=0;
angle1="rad 280";
};

class Kars_HiluxIndicatorRPM
{
animPeriod=0;
type="rotation";
source="rpm";
selection="ukaz_rpm";
axis="osa_rpm";
memory=0;
minValue=0.000000;
maxValue=1.000000;
angle0=0.000000;
angle1=2.967060;
};

class Kars_HiluxDrivingWheel
{
type="rotation";
source="drivingWheel";
selection="volant";
begin="osaVolantZac";
end="osaVolantKon";
memory="false";
animPeriod=0;
minValue=-1;
maxValue=1;
angle0=-8;
angle1=8;
};
class Kars_Hilux_DestroyLF
{
Type = "hide";
Source = "HitLFWheel";
Selection = "levy predni";
MinValue = 0.00;
MaxValue = 1.00;
SourceAddress = "clamp";
hideValue = 0.98;
};
class Kars_Hilux_DestroyLB
{
Type = "hide";
Source = "HitLBWheel";
Selection = "levy zadni";
MinValue = 0.00;
MaxValue = 1.00;
SourceAddress = "clamp";
hideValue = 0.98;
};
class Kars_Hilux_DestroyRF
{
Type = "hide";
Source = "HitRFWheel";
Selection = "pravy predni";
MinValue = 0.00;
MaxValue = 1.00;
SourceAddress = "clamp";
hideValue = 0.98;
};
class Kars_Hilux_DestroyRB
{
Type = "hide";
Source = "HitRBWheel";
Selection = "pravy zadni";
MinValue = 0.00;
MaxValue = 1.00;
SourceAddress = "clamp";
hideValue = 0.98;
};
class Kars_Hilux_unhideLF
{
Type = "hide";
Source = "HitLFWheel";
Selection = "levy predni";
MinValue = -1.00;
MaxValue = 0.00;
SourceAddress = "mirror";
hideValue = 0.02;
};
class Kars_Hilux_unhideLB
{
Type = "hide";
Source = "HitLBWheel";
Selection = "levy zadni";
MinValue = -1.00;
MaxValue = 0.00;
SourceAddress = "mirror";
hideValue = 0.02;
};
class Kars_Hilux_unhideRF
{
Type = "hide";
Source = "HitRFWheel";
Selection = "pravy predni";
MinValue = -1.00;
MaxValue = 0.00;
SourceAddress = "mirror";
hideValue = 0.02;
};
class Kars_Hilux_unhideRB
{
Type = "hide";
Source = "HitRBWheel";
Selection = "pravy zadni";
MinValue = -1.00;
MaxValue = 0.00;
SourceAddress = "mirror";
hideValue = 0.02;
};
};
};
}; 

Edited by Karrr

Share this post


Link to post
Share on other sites

Do the unhide wheel proxies point to broken wheel models in ca\data?

Share this post


Link to post
Share on other sites
Do the unhide wheel proxies point to broken wheel models in ca\data?

I'm not exactly sure what a wheel proxy is. I'm not even exactly sure what this code does

 class Kars_Hilux_unhideLF
{
Type = "hide";
Source = "HitLFWheel";
Selection = "levy predni";
MinValue = -1.00;
MaxValue = 0.00;
SourceAddress = "mirror";
hideValue = 0.02;
}; 

Can you explain the code to me?

Edited by Karrr

Share this post


Link to post
Share on other sites

A proxy object is a thing in your model file which refers to another model. They look like weird right triangles. In your named selections dialogue, they appear as proxy:some\path\to.p3d.

Type= "hide"; means the animation type is a hide animation, as opposed to a translate (move), or rotate animation.

Source = "HitLFWheel"; means that the values that drive the animation is something called HitLFWheel. This is correlated to two entries in your config.cpp. There ought to be a class hitpoints class, and a class animationsources class both called this. The animationsources class creates an animation source based on the state of damage of the part described in class hitpoints.

Selection = "levy predni"; The named selection to be animated is called levy predni.

MinValue = -1.00; This denotes the minimum value of the animation source to drive the animation.

Max Value = 0.00; This denotes the maximum value of the animation source to drive the animation.

SourceAddress = Mirror; Describes what happens when the animation source is outside of the min and max value. For this animation, it would mean that between -1 and 0, levy predni would hide. Between 0 an 1, it would unhide, and between 1 and 2, it would hide, etc.

HideValue = 0.02; Says exactly when the hide value will be performed. For some reason, this value means it will be performed at -0.98, and again, because of the mirror, at 0.98.

What this code does is sets up a mirrored hide animation in the negative range of a hitpoint animation source. When a vehicle part gets damaged, its hitpoints increase between 0 and 1. Since the animation is mirrored from the -1 to 0, between then normal values you get from the hitpoints, 0 to 1, it becomes an unhide animation. At 0, the animation state is hidden, and it unhides when the hitpoint has 0.98 damage.

Edited by Max Power

Share this post


Link to post
Share on other sites
A proxy object is a thing in your model file which refers to another model. They look like weird right triangles. In your named selections dialogue, they appear as proxy:some\path\to.p3d.

Type= "hide"; means the animation type is a hide animation, as opposed to a translate (move), or rotate animation.

Source = "HitLFWheel"; means that the values that drive the animation is something called HitLFWheel. This is correlated to two entries in your config.cpp. There ought to be a class hitpoints class, and a class animationsources class both called this. The animationsources class creates an animation source based on the state of damage of the part described in class hitpoints.

Selection = "levy predni"; The named selection to be animated is called levy predni.

MinValue = -1.00; This denotes the minimum value of the animation source to drive the animation.

Max Value = 0.00; This denotes the maximum value of the animation source to drive the animation.

SourceAddress = Mirror; Describes what happens when the animation source is outside of the min and max value. For this animation, it would mean that between -1 and 0, levy predni would hide. Between 0 an 1, it would unhide, and between 1 and 2, it would hide, etc.

HideValue = 0.02; Says exactly when the hide value will be performed. For some reason, this value means it will be performed at -0.98, and again, because of the mirror, at 0.98.

What this code does is sets up a mirrored hide animation in the negative range of a hitpoint animation source. When a vehicle part gets damaged, its hitpoints increase between 0 and 1. Since the animation is mirrored from the -1 to 0, between then normal values you get from the hitpoints, 0 to 1, it becomes an unhide animation. At 0, the animation state is hidden, and it unhides when the hitpoint has 0.98 damage.

So where do I put in the code to display the broken wheel after the damage limit is reached, how do I direct it to the model of the broken wheel.

EDIT: Okay I get what you mean by a proxy now, I'm using the default Hilux from sample models would the proxy's already be in there? I've looked around in the different LOD's but can only locate the flag, driver seat, and the three passenger seat proxy's. If the proxies aren't already in the model how would I make them myself?

Edited by Karrr

Share this post


Link to post
Share on other sites

select a whole wheel object. Press c to centre the pin on the selection. Press shift + c to use the pin.

On the top bar:

Create\Proxy

Fill in a path to a destroyed wheel object. For instance:

ca\wheeled\data\damagewheel\damagewheel_n.p3d where n is a number between 1 and 6. You might have to try a few of them to figure out which one makes sense. The path may vary if you are using OA or Reinforcements.

Select the proxy and create a named selection that fits with your wheel unhide naming scheme.

Do that once more for each wheel.

Select all your wheel proxies and copy and paste them into each resolution LOD.

Share this post


Link to post
Share on other sites
select a whole wheel object. Press c to centre the pin on the selection. Press shift + c to use the pin.

On the top bar:

Create\Proxy

Fill in a path to a destroyed wheel object. For instance:

ca\wheeled\data\damagewheel\damagewheel_n.p3d where n is a number between 1 and 6. You might have to try a few of them to figure out which one makes sense. The path may vary if you are using OA or Reinforcements.

Select the proxy and create a named selection that fits with your wheel unhide naming scheme.

Do that once more for each wheel.

Select all your wheel proxies and copy and paste them into each resolution LOD.

K I'll start doing that now, is it only the resolution LOD's the proxies need to be in?

EDIT: How do I rename the proxy so I can reference it in the model config? When I hit rename it wants me to change the path to the model.

Edited by Karrr

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  

×