Jump to content
miguel93041

Problems with setObjectTexture

Recommended Posts

Helloo im mading a lightbar.. and as far as i know my lightbar isnt working. I´ve tried lot of things.. Like letting the engine to run several commands with sleeps or moving the selections to front. Nothing worked.

 

First im going to post my files then i explain my problem. (All this files are inside a vehicle mod)

 

config.cfg (car)

-Nothing to explain here just posting the hiddenSelections and UserActions:

hiddenSelections[] = {"camo1","lle_1","lle_2","lme_1","lme_2","lme_3","lme_4","lme_5","lme_6","lme_7","lme_8","lme_9","lpe_1","lpe_2","lpe_3","lpe_4","lpe_5","lpe_6","lpe_7","lpe_8","lpe_9","lpe_10","lpe_11","lpe_12","lpe_13","lpe_14","lpe_15","lpe_16","lpe_17","lpe_18","lpe_19","lpe_20","lpe_21","lpe_22","lpe_23","lre","le_1","le_2","le_3","le_4","le_5","le_6","le_7","le_8"};
class UserActions
{
	class Activarsirena
	{
		displayName = "<t color='#a40000'>Activar sirena</t>";
		position = "drivewheel";
		radius = 10;
		condition = "driver this == player";
		statement = "this animate ['ani_sirens', 0.5]";
		onlyForplayer = 1;
	};
	class Cambiarsirena1
	{
		displayName = "<t color='#FCA304'>Cambiar sirena</t>";
		position = "drivewheel";
		radius = 10;
		condition = "driver this == player && (this animationPhase 'ani_sirens' ==  0.5)";
		statement = "this animate ['ani_sirens', 0.6]";
		onlyForplayer = 1;
	};
	class Cambiarsirena2
	{
		displayName = "<t color='#FCA304'>Cambiar sirena</t>";
		position = "drivewheel";
		radius = 10;
		condition = "driver this == player && (this animationPhase 'ani_sirens' ==  0.6)";
		statement = "this animate ['ani_sirens', 0.7]";
		onlyForplayer = 1;
	};
	class Cambiarsirena3
	{
		displayName = "<t color='#FCA304'>Cambiar sirena</t>";
		position = "drivewheel";
		radius = 10;
		condition = "driver this == player && (this animationPhase 'ani_sirens' ==  0.7)";
		statement = "this animate ['ani_sirens', 0.5]";
		onlyForplayer = 1;
	};
	class Desactivarsirena
	{
		displayName = "<t color='#ff0000'>Apagar sirena</t>";
		position = "drivewheel";
		radius = 10;
		condition = "driver this == player";
		statement = "this animate ['ani_sirens', 0]"; 
	        onlyForplayer = 1;
	};
	class ApagarLED //name does matter however can't be the same on same PBO or will cause an error
	{
		displayName = "<t color='#a40000'>Apagar luces</t>";
		position = "lightbar_axis";
		radius = 10;
		condition = "driver this == player && (this animationPhase 'ani_lightbar' !=  0)"; //this is the command in animation below and model.cfg 0 meaning off and 0.5 or whatever meaning on these are case (0.5): { lightbar line 19
		statement = "this animate ['ani_lightbar', 0]";
		onlyForplayer = 1;
	};
	class LED //name does matter however can't be the same on same PBO or will cause an error
	{
		displayName = "<t color='#a40000'>Luces de posicion</t>";
		position = "lightbar_axis";
		radius = 10;
		condition = "driver this == player && (this animationPhase 'ani_lightbar' !=  0.1)"; //this is the command in animation below and model.cfg 0 meaning off and 0.5 or whatever meaning on these are case (0.5): { lightbar line 19
		statement = "this animate ['ani_lightbar', 0.1]";
		onlyForplayer = 1;
	};
	class LED1 //name does matter however can't be the same on same PBO or will cause an error
	{
		displayName = "<t color='#a40000'>Luces intermitentes</t>";
		position = "lightbar_axis";
		radius = 10;
		condition = "driver this == player && (this animationPhase 'ani_lightbar' !=  0.2)"; //this is the command in animation below and model.cfg 0 meaning off and 0.5 or whatever meaning on these are case (0.5): { lightbar line 19
		statement = "this animate ['ani_lightbar', 0.2]";
		onlyForplayer = 1;
	};
	class LED2 //name does matter however can't be the same on same PBO or will cause an error
	{
		displayName = "<t color='#a40000'>Luces de alto delante</t>";
		position = "lightbar_axis";
		radius = 10;
		condition = "driver this == player && (this animationPhase 'ani_lightbar' !=  0.3)"; //this is the command in animation below and model.cfg 0 meaning off and 0.5 or whatever meaning on these are case (0.5): { lightbar line 19
		statement = "this animate ['ani_lightbar', 0.3]";
	        onlyForplayer = 1;
	};
	class LED3 //name does matter however can't be the same on same PBO or will cause an error
	{
		displayName = "<t color='#a40000'>Luces de alto detras</t>";
		position = "lightbar_axis";
		radius = 10;
		condition = "driver this == player && (this animationPhase 'ani_lightbar' !=  0.4)"; //this is the command in animation below and model.cfg 0 meaning off and 0.5 or whatever meaning on these are case (0.5): { lightbar line 19
		statement = "this animate ['ani_lightbar', 0.4]";
		onlyForplayer = 1;
	};
	class LED4 //name does matter however can't be the same on same PBO or will cause an error
	{
		displayName = "<t color='#a40000'>Luces de alerta</t>";
		position = "lightbar_axis";
		radius = 10;
		condition = "driver this == player && (this animationPhase 'ani_lightbar' !=  0.5)"; //this is the command in animation below and model.cfg 0 meaning off and 0.5 or whatever meaning on these are case (0.5): { lightbar line 19
		statement = "this animate ['ani_lightbar', 0.5]";
		onlyForplayer = 1;
	};
};

model.cfg (selections in model)

		sections[]=
		{
			"Camo1",
			"Camo2",
			"Camo3",
			"body",
			"karoserie",
			"palivo",
			"ani_sirens",
			"sirens_axis",
			"lightbar_axis",
			"lightbar",
			"lle_1",
			"lle_2",
			"lme_1",
			"lme_2",
			"lme_3",
			"lme_4",
			"lme_5",
			"lme_6",
			"lme_7",
			"lme_8",
			"lme_9",
			"lpe_1",
			"lpe_2",
			"lpe_3",
			"lpe_4",
			"lpe_5",
			"lpe_6",
			"lpe_7",
			"lpe_8",
			"lpe_9",
			"lpe_10",
			"lpe_11",
			"lpe_12",
			"lpe_13",
			"lpe_14",
			"lpe_15",
			"lpe_16",
			"lpe_17",
			"lpe_18",
			"lpe_19",
			"lpe_20",
			"lpe_21",
			"lpe_22",
			"lpe_23",
			"lre",
			"le_1",
			"le_2",
			"le_3",
			"le_4",
			"le_5",
			"le_6",
			"le_7",
			"le_8"
		};

lightbar.sqf (car script is executed so dont worry, the execution is not a problem)


	
private["_car","_lights","_light"]; //parts used in list below
_car = _this;


_lights = "\renault clio\puente\textures\luces_puente1.paa"; //texture used on part in lod1

_light = (alive _car);


while {alive _car} do {

	_phase = _car animationPhase "ani_lightbar";
	_phasedirectional = _car animationPhase "ani_directional";

	switch (_phase) do {
			
		case (0.1): { //Posicion
		
			//ON BLUE LIGHTS PANEL
			_car setObjectTexture [1,_lights];
			_car setObjectTexture [2,_lights];
			
			//ON BLUE LIGHTS
			_car setObjectTexture [12,_lights];
			_car setObjectTexture [13,_lights];
			_car setObjectTexture [14,_lights];
			_car setObjectTexture [15,_lights];
			_car setObjectTexture [19,_lights];
			_car setObjectTexture [20,_lights];
			_car setObjectTexture [21,_lights];
			_car setObjectTexture [23,_lights];
			_car setObjectTexture [24,_lights];
			_car setObjectTexture [25,_lights];
			_car setObjectTexture [26,_lights];
			_car setObjectTexture [27,_lights];
			_car setObjectTexture [28,_lights];
			_car setObjectTexture [29,_lights];	
			_car setObjectTexture [30,_lights];
			_car setObjectTexture [31,_lights];
			_car setObjectTexture [32,_lights];
			_car setObjectTexture [33,_lights];	
			
		};
		
		case (0.2): { //Intermitentes
		
			//blue light left
			_car setObjectTexture [13,_lights];
			_car setObjectTexture [14,_lights];
			_car setObjectTexture [19,_lights];
			_car setObjectTexture [20,_lights];
			_car setObjectTexture [21,_lights];
			_car setObjectTexture [26,_lights];
			_car setObjectTexture [27,_lights];
			_car setObjectTexture [28,_lights];
			_car setObjectTexture [29,_lights];
			
			//blue light panel left
			_car setObjectTexture [1,_lights];

			sleep 0.8;
			
			//OFF blue lights left
			_car setObjectTexture [13,""];
			_car setObjectTexture [14,""];
			_car setObjectTexture [19,""];
			_car setObjectTexture [20,""];
			_car setObjectTexture [21,""];
			_car setObjectTexture [26,""];
			_car setObjectTexture [27,""];
			_car setObjectTexture [28,""];
			_car setObjectTexture [29,""];
			_car setObjectTexture [1,""];
			
			//on blue lights right
			_car setObjectTexture [15,_lights];
			_car setObjectTexture [16,_lights];
			_car setObjectTexture [23,_lights];
			_car setObjectTexture [24,_lights];
			_car setObjectTexture [25,_lights];
			_car setObjectTexture [30,_lights];
			_car setObjectTexture [31,_lights];
			_car setObjectTexture [32,_lights];
			_car setObjectTexture [33,_lights];
			_car setObjectTexture [2,_lights];
			
			sleep 0.8;
			
			//OFF BLUE LIGHTS RIGHT
			_car setObjectTexture [15,""];
			_car setObjectTexture [16,""];
			_car setObjectTexture [23,""];
			_car setObjectTexture [24,""];
			_car setObjectTexture [25,""];
			_car setObjectTexture [30,""];
			_car setObjectTexture [31,""];
			_car setObjectTexture [32,""];
			_car setObjectTexture [33,""];
			_car setObjectTexture [2,""];
		
		};

		
		case (0): { // OFF
		
			//BLUE LIGHTS
			_car setObjectTexture [12,""];
			_car setObjectTexture [13,""];
			_car setObjectTexture [14,""];
			_car setObjectTexture [15,""];
			_car setObjectTexture [19,""];
			_car setObjectTexture [20,""];
			_car setObjectTexture [21,""];
			_car setObjectTexture [23,""];
			_car setObjectTexture [24,""];
			_car setObjectTexture [25,""];
			_car setObjectTexture [26,""];
			_car setObjectTexture [27,""];
			_car setObjectTexture [28,""];
			_car setObjectTexture [29,""];	
			_car setObjectTexture [30,""];
			_car setObjectTexture [31,""];
			_car setObjectTexture [32,""];
			_car setObjectTexture [33,""];	
			
		};
	};
	sleep 0.01;
}; 

_light setLightBrightness 0;

In game when you interact with the action. The lights are not working... They are like blinking instead of glowing but 2 or 3 that are glowing.

Im gonna post a photo and gifs..

 

GIF of blinking lights: https://gyazo.com/d99b3d7d4cb6a6e583b6650b396f3f70

                                  https://gyazo.com/51c10e90695912e5be9b17d62bfbf7fe  <-- AT THE END OF THIS GIF YOU CAN SEE HOW THE BLUE LIGHTS BLINK INSTEAD OF GLOW

 

Here you can see the lightbar illuminated: https://gyazo.com/61d780c97db918916d38cfd2d960135c

 

What i want to get its that one side glow, then turn off that side and turn on the other side (left-right-left-right) like a lightbar.. but is blinking instead of glowing the side

Share this post


Link to post
Share on other sites

I have tried duplicating the selections that are working "fine" (glow) into a new one but nothing.

Tried setObjectTextureGlobal, no works.

I looked into sleep, setObjectTexture, switch etc... bis web pages for the notes at the end of the web but nothing interesting..

Share this post


Link to post
Share on other sites

To be honest, your question is a bit chaotic, but it's great that you included (some) code to show what you currently have.

 

If I understand correctly;

- you want to have the lightbar to alternate the lights between left and right (which currently works, since they blink)

- you want the lights to glow, so that the area around it is also colored

 

 

For that you should take a look at setLightAmbient and lightAttachObject (also check the comments!).

 

Although I'm not exactly sure how it works, it should be possible to use something like setLightBrightness to alternate between ON and OFF.

Share this post


Link to post
Share on other sites

Thank you grezvany for your answer, any help is apreciated.

Im searching what you say but im not using lightspoints im using a texture with a rvmat to glow it.

But as far as you can see some selections of the model that are "lights", are blinking (it sets the texture for 0.1s then turn it off, why?) instead of setting the texture and not turning it off. Thats what setobjecttexture does, but its not doing it for some "lights"

Share this post


Link to post
Share on other sites

- you want to have the lightbar to alternate the lights between left and right (which currently works, since they blink)

- you want the lights to glow, so that the area around it is also colored

 

I wont the lights to glow so the area around its colored, they are already with the rvmat, but i want them just to glow (set the texture) (be paint blue)

Share this post


Link to post
Share on other sites

I´ve found where the problem is but im not able to fix it..

The problem is in hiddenSelections.. For example number 2 selection is setting texture correctly, so i change the order, i´ve put the number 17 for example that was "bug" into the number 2, then it worked fine but the previous selection on number 2 started to bug

Share this post


Link to post
Share on other sites

I´ve found where the problem is but im not able to fix it..

The problem is in hiddenSelections.. For example number 2 selection is setting texture correctly, so i change the order, i´ve put the number 17 for example that was "bug" into the number 2, then it worked fine but the previous selection on number 2 started to bug

 

I´ve been trying to fix the problem for myself but nothing. When i have more than 3 hiddenSelections (including 0) the next ones starts to bug.

For example if i want to set a texture on a selection in the first place, it stand for 0,3s (example time) and if i want the fifth selection to set the same texture for 0,3s it stands for 0,1s or less then it removes the texture.

 

Im gonna post the full config.cpp and model.cfg

 

config.cpp:

#include "basicdefines_A3.hpp"
class DefaultEventhandlers;

#include "CfgPatches.hpp"

class WeaponFireGun;
class WeaponCloudsGun;
class WeaponFireMGun;
class WeaponCloudsMGun;

class CfgSounds
{
	class sirena1
	{
		name = "sirena1";
		sound[] = {"renault clio\sounds\sirena1.wav",5,1};
		titles[] = {};
	};
	class sirena2
	{
		name = "sirena2";
		sound[] = {"renault clio\sounds\sirena2.wav",5,1};
		titles[] = {};
	};
	class sirena3
	{
		name = "sirena3";
		sound[] = {"renault clio\sounds\sirena3.wav",5,1};
		titles[] = {};
	};
};

class CfgVehicles
{
	class Car;
	class Car_F: Car
	{
		class HitPoints /// we want to use hitpoints predefined for all cars
		{
			class HitRGlass;
			class HitLGlass;
			class HitGlass1;
			class HitGlass2;
			class HitGlass3;
			class HitGlass4;
			class HitGlass5;
			class HitGlass6;
			class HitBody;
			class HitFuel;
			class HitLFWheel;
			class HitLBWheel;
			class HitLMWheel;
			class HitLF2Wheel;
			class HitRFWheel;
			class HitRBWheel;
			class HitRMWheel;
			class HitRF2Wheel;
			class HitEngine;
		};
		class EventHandlers;
		class AnimationSources;
	};

	class Renault_Clio_base_F: Car_F
	{
		model 	= "\renault clio\Renault_Clio";  /// simple path to model
		picture	= "\A3\Weapons_F\Data\placeholder_co.paa"; /// just some icon in command bar
		Icon	= "\A3\Weapons_F\Data\placeholder_co.paa"; /// icon in map

		displayName = "Test Car"; /// displayed in Editor

		hiddenSelections[] = {"camo1","pue_1","pue_2","pue_3","pue_4","pue_5","pue_6","pue_7","pue_8","pue_9","lme_1","lme_2","lme_3","lme_4","lme_6","lme_7","lme_8","lme_9"}; 
		//		      ||0||   ||1||   ||2||   ||3||   ||4||   ||5||   ||6||   ||7||   ||8||   ||9||   ||10||   ||11||   ||12||  ||13|| ||14||  ||15|| ||16|| ||17||
		terrainCoef 	= 6.5; 	/// different surface affects this car more, stick to tarmac
		turnCoef 		= 2.5; 	/// should match the wheel turn radius
		precision 		= 10; 	/// how much freedom has the AI for its internal waypoints - lower number means more precise but slower approach to way
		brakeDistance 	= 3.0; 	/// how many internal waypoints should the AI plan braking in advance
		acceleration 	= 18; 	/// how fast acceleration does the AI think the car has

		fireResistance 	= 5; 	/// lesser protection against fire than tanks
		armor 			= 32; 	/// just some protection against missiles, collisions and explosions
		cost			= 50000; /// how likely is the enemy going to target this vehicle

		transportMaxBackpacks 	= 3; /// just some backpacks fit the trunk by default
		transportSoldier 		= 3; /// number of cargo except driver

		/// some values from parent class to show how to set them up
		wheelDamageRadiusCoef 	= 0.9; 			/// for precision tweaking of damaged wheel size
		wheelDestroyRadiusCoef 	= 0.4;			/// for tweaking of rims size to fit ground
		maxFordingDepth 		= 0.5;			/// how high water would damage the engine of the car
		waterResistance 		= 1;			/// if the depth of water is bigger than maxFordingDepth it starts to damage the engine after this time
		crewCrashProtection		= 0.25;			/// multiplier of damage to crew of the vehicle => low number means better protection
		driverLeftHandAnimName 	= "drivewheel"; /// according to what bone in model of car does hand move
		driverRightHandAnimName = "drivewheel";	/// beware, non-existent bones may cause game crashes (even if the bones are hidden during play)

		//weapons[] = {"sirena1","sirena2","sirena3"};
		
		class TransportItems /// some first aid kits in trunk according to safety regulations
		{
			item_xx(FirstAidKit,4);
		};

		class Turrets{}; /// doesn't have any gunner nor commander
		class HitPoints: HitPoints
		{
			class HitLFWheel: HitLFWheel
			{
				armor=0.75;
				radius=0.2;
			};
			class HitLF2Wheel: HitLF2Wheel
			{
				armor=0.75;
				radius=0.2;
			};
			class HitRFWheel: HitRFWheel
			{
				armor=0.75;
				radius=0.2;
			};
			class HitRF2Wheel: HitRF2Wheel
			{
				armor=0.75;
				radius=0.2;
			};
			class HitFuel
			{
				armor=2;
				material=-1;
				name="palivo";
				radius=0.44999999;
				passThrough=0.2;
			};
			class HitEngine
			{
				armor=4;
				material=-1;
				name="engine";
				radius=0.25;
				passThrough=0.2;
			};
			class HitGlass1: HitGlass1
			{
				armor=2;
				radius=0.5;
			};
			class HitGlass2: HitGlass2
			{
				armor=2;
				radius=0.5;
			};
			class HitGlass3: HitGlass3
			{
				armor=2;
				radius=0.5;
			};
			class HitGlass4: HitGlass4
			{
				armor=2;
				radius=0.5;
			};
			class HitGlass5: HitGlass5
			{
				armor=2;
				radius=0.5;
			};
			class HitGlass6: HitGlass6
			{
				armor=2;
				radius=0.5;
			};
			class HitBody: HitBody
			{
				name="body";
				visual="camo1";
				passThrough=0;
			};
		};

		driverAction 		= driver_offroad01; /// what action is going the driver take inside the vehicle. Non-existent action makes the vehicle inaccessible
		cargoAction[] 		= {passenger_low01, passenger_generic01_leanleft, passenger_generic01_foldhands}; /// the same of all the crew
		getInAction 		= GetInLow; 		/// how does driver look while getting in
		getOutAction 		= GetOutLow; 		/// and out
		cargoGetInAction[] 	= {"GetInLow"}; 	/// and the same for the rest, if the array has fewer members than the count of crew, the last one is used for the rest
		cargoGetOutAction[] = {"GetOutLow"}; 	/// that means all use the same in this case

		#include "sounds.hpp"	/// sounds are in a separate file to make this one simple
		#include "physx.hpp"	/// PhysX settings are in a separate file to make this one simple

		class PlayerSteeringCoefficients /// steering sensitivity configuration
		{
			 turnIncreaseConst 	= 0.3; // basic sensitivity value, higher value = faster steering
			 turnIncreaseLinear = 1.0; // higher value means less sensitive steering in higher speed, more sensitive in lower speeds
			 turnIncreaseTime 	= 1.0; // higher value means smoother steering around the center and more sensitive when the actual steering angle gets closer to the max. steering angle

			 turnDecreaseConst 	= 5.0; // basic caster effect value, higher value = the faster the wheels align in the direction of travel
			 turnDecreaseLinear = 3.0; // higher value means faster wheel re-centering in higher speed, slower in lower speeds
			 turnDecreaseTime 	= 0.0; // higher value means stronger caster effect at the max. steering angle and weaker once the wheels are closer to centered position

			 maxTurnHundred 	= 0.7; // coefficient of the maximum turning angle @ 100km/h; limit goes linearly to the default max. turn. angle @ 0km/h
		};

		/// memory points where do tracks of the wheel appear
		// front left track, left offset
		memoryPointTrackFLL = "TrackFLL";
		// front left track, right offset
		memoryPointTrackFLR = "TrackFLR";
		// back left track, left offset
		memoryPointTrackBLL = "TrackBLL";
		// back left track, right offset
		memoryPointTrackBLR = "TrackBLR";
		// front right track, left offset
		memoryPointTrackFRL = "TrackFRL";
		// front right track, right offset
		memoryPointTrackFRR = "TrackFRR";
		// back right track, left offset
		memoryPointTrackBRL = "TrackBRL";
		// back right track, right offset
		memoryPointTrackBRR = "TrackBRR";

		class Damage /// damage changes material in specific places (visual in hitPoint)
		{
			tex[]={};
			mat[]=
			{
				"A3\data_f\glass_veh_int.rvmat", 		/// material mapped in model
				"A3\data_f\Glass_veh_damage.rvmat", 	/// changes to this one once damage of the part reaches 0.5
				"A3\data_f\Glass_veh_damage.rvmat",		/// changes to this one once damage of the part reaches 1

				"A3\data_f\glass_veh.rvmat",			/// another material
				"A3\data_f\Glass_veh_damage.rvmat",		/// changes into different ones
				"A3\data_f\Glass_veh_damage.rvmat"
			};
		};

		class Exhausts /// specific exhaust effects for the car
		{
			class Exhaust1 /// the car has two exhausts - each on one side
			{
				position 	= "exhaust1";  		/// name of initial memory point
				direction 	= "exhaust1_dir";	/// name of memory point for exhaust direction
				effect 		= "ExhaustsEffect";	/// what particle effect is it going to use
			};

			class Exhaust2
			{
				position 	= "exhaust2_pos";
				direction 	= "exhaust2_dir";
				effect 		= "ExhaustsEffect";
			};
		};
		
		class RenderTargets //side view mirrors
		{
			class LeftMirror
			{
				renderTarget = "rendertarget0"; //this is the texture on the mirror by hitting E in object builder
				class CameraView1
				{
					pointPosition = "PIP0_pos"; //this is the memory LOD
					pointDirection = "PIP0_dir"; //this is the memory LOD
					renderQuality = 2;
					renderVisionMode = 0;
					fov = 0.7;
				};
			};
			class RearCam
			{
				renderTarget = "rendertarget1"; //this is the texture on the mirror by hitting E in object builder
				class CameraView1
				{
					pointPosition = "PIP1_pos"; //this is the memory LOD
					pointDirection = "PIP1_dir"; //this is the memory LOD
					renderQuality = 2;
					renderVisionMode = 0;
					fov = 0.7;
				};
			};
			class FrontCam
			{
				renderTarget = "rendertarget2"; //this is the texture on the mirror by hitting E in object builder
				class CameraView1
				{
					pointPosition = "PIP2_pos"; //this is the memory LOD
					pointDirection = "PIP2_dir"; //this is the memory LOD
					renderQuality = 2;
					renderVisionMode = 0;
					fov = 0.7;
				};
			};
		};

		class Reflectors	/// only front lights are considered to be reflectors to save CPU
		{
			class LightCarHeadL01 	/// lights on each side consist of two bulbs with different flares
			{
				color[] 		= {1900, 1800, 1700};		/// approximate colour of standard lights
				ambient[]		= {5, 5, 5};				/// nearly a white one
				position 		= "LightCarHeadL01";		/// memory point for start of the light and flare
				direction 		= "LightCarHeadL01_end";	/// memory point for the light direction
				hitpoint 		= "Light_L";				/// point(s) in hitpoint lod for the light (hitPoints are created by engine)
				selection 		= "Light_L";				/// selection for artificial glow around the bulb, not much used any more
				size 			= 1;						/// size of the light point seen from distance
				innerAngle 		= 100;						/// angle of full light
				outerAngle 		= 179;						/// angle of some light
				coneFadeCoef 	= 10;						/// attenuation of light between the above angles
				intensity 		= 1;						/// strength of the light
				useFlare 		= true;						/// does the light use flare?
				dayLight 		= false;					/// switching light off during day saves CPU a lot
				flareSize 		= 1.0;						/// how big is the flare

				class Attenuation
				{
					start 			= 1.0;
					constant 		= 0;
					linear 			= 0;
					quadratic 		= 0.25;
					hardLimitStart 	= 30;		/// it is good to have some limit otherwise the light would shine to infinite distance
					hardLimitEnd 	= 60;		/// this allows adding more lights into scene
				};
			};

			class LightCarHeadL02: LightCarHeadL01
			{
				position 	= "LightCarHeadL02";
				direction 	= "LightCarHeadL02_end";
				FlareSize 	= 0.5;						/// side bulbs aren't that strong
			};

			class LightCarHeadR01: LightCarHeadL01
			{
				position 	= "LightCarHeadR01";
				direction 	= "LightCarHeadR01_end";
				hitpoint 	= "Light_R";
				selection 	= "Light_R";
			};

			class LightCarHeadR02: LightCarHeadR01
			{
				position 	= "LightCarHeadR02";
				direction 	= "LightCarHeadR02_end";
				FlareSize 	= 0.5;
			};
		};

		aggregateReflectors[] = {{"LightCarHeadL01", "LightCarHeadL02"}, {"LightCarHeadR01", "LightCarHeadR02"}}; /// aggregating reflectors helps the engine a lot
		/// it might be even good to aggregate all lights into one source as it is done for most of the cars

		class EventHandlers: EventHandlers
		{
			init = "_this execVM '\renault clio\scripts\init.sqf';";
		};
		
		class UserActions
		{
			class Activarsirena
			{
				displayName = "<t color='#a40000'>Activar sirena</t>";
				position = "drivewheel";
				radius = 10;
				condition = "driver this == player";
				statement = "this animate ['ani_sirens', 0.5]";
				onlyForplayer = 1;
			};
			class Cambiarsirena1
			{
				displayName = "<t color='#FCA304'>Cambiar sirena</t>";
				position = "drivewheel";
				radius = 10;
				condition = "driver this == player && (this animationPhase 'ani_sirens' ==  0.5)";
				statement = "this animate ['ani_sirens', 0.6]";
				onlyForplayer = 1;
			};
			class Cambiarsirena2
			{
				displayName = "<t color='#FCA304'>Cambiar sirena</t>";
				position = "drivewheel";
				radius = 10;
				condition = "driver this == player && (this animationPhase 'ani_sirens' ==  0.6)";
				statement = "this animate ['ani_sirens', 0.7]";
				onlyForplayer = 1;
			};
			class Cambiarsirena3
			{
				displayName = "<t color='#FCA304'>Cambiar sirena</t>";
				position = "drivewheel";
				radius = 10;
				condition = "driver this == player && (this animationPhase 'ani_sirens' ==  0.7)";
				statement = "this animate ['ani_sirens', 0.5]";
				onlyForplayer = 1;
			};
			class Desactivarsirena
			{
				displayName = "<t color='#ff0000'>Apagar sirena</t>";
				position = "drivewheel";
				radius = 10;
				condition = "driver this == player";
				statement = "this animate ['ani_sirens', 0]"; 
				onlyForplayer = 1;
			};
			class ApagarLED //name does matter however can't be the same on same PBO or will cause an error
			{
				displayName = "<t color='#a40000'>Apagar luces</t>";
				position = "lightbar_axis";
				radius = 10;
				condition = "driver this == player && (this animationPhase 'ani_lightbar' !=  0)"; //this is the command in animation below and model.cfg 0 meaning off and 0.5 or whatever meaning on these are case (0.5): { lightbar line 19
				statement = "this animate ['ani_lightbar', 0]";
				onlyForplayer = 1;
			};
			class LED //name does matter however can't be the same on same PBO or will cause an error
			{
				displayName = "<t color='#a40000'>Luces de posicion</t>";
				position = "lightbar_axis";
				radius = 10;
				condition = "driver this == player && (this animationPhase 'ani_lightbar' !=  0.1)"; //this is the command in animation below and model.cfg 0 meaning off and 0.5 or whatever meaning on these are case (0.5): { lightbar line 19
				statement = "this animate ['ani_lightbar', 0.1]";
				onlyForplayer = 1;
			};
			class LED1 //name does matter however can't be the same on same PBO or will cause an error
			{
				displayName = "<t color='#a40000'>Luces intermitentes</t>";
				position = "lightbar_axis";
				radius = 10;
				condition = "driver this == player && (this animationPhase 'ani_lightbar' !=  0.2)"; //this is the command in animation below and model.cfg 0 meaning off and 0.5 or whatever meaning on these are case (0.5): { lightbar line 19
				statement = "this animate ['ani_lightbar', 0.2]";
				onlyForplayer = 1;
			};
			class LED2 //name does matter however can't be the same on same PBO or will cause an error
			{
				displayName = "<t color='#a40000'>Luces de alto delante</t>";
				position = "lightbar_axis";
				radius = 10;
				condition = "driver this == player && (this animationPhase 'ani_lightbar' !=  0.3)"; //this is the command in animation below and model.cfg 0 meaning off and 0.5 or whatever meaning on these are case (0.5): { lightbar line 19
				statement = "this animate ['ani_lightbar', 0.3]";
				onlyForplayer = 1;
			};
			class LED3 //name does matter however can't be the same on same PBO or will cause an error
			{
				displayName = "<t color='#a40000'>Luces de alto detras</t>";
				position = "lightbar_axis";
				radius = 10;
				condition = "driver this == player && (this animationPhase 'ani_lightbar' !=  0.4)"; //this is the command in animation below and model.cfg 0 meaning off and 0.5 or whatever meaning on these are case (0.5): { lightbar line 19
				statement = "this animate ['ani_lightbar', 0.4]";
				onlyForplayer = 1;
			};
			class LED4 //name does matter however can't be the same on same PBO or will cause an error
			{
				displayName = "<t color='#a40000'>Luces de alerta</t>";
				position = "lightbar_axis";
				radius = 10;
				condition = "driver this == player && (this animationPhase 'ani_lightbar' !=  0.5)"; //this is the command in animation below and model.cfg 0 meaning off and 0.5 or whatever meaning on these are case (0.5): { lightbar line 19
				statement = "this animate ['ani_lightbar', 0.5]";
				onlyForplayer = 1;
			};
		};
		
		
		class AnimationSources: AnimationSources //this is controlled by the model.cfg file
		{
			class Zeroanimation
			{
				source = "user";
				animPeriod = 0;
				initPhase = 0;
			};
			class LightAnim
			{
				source = "user";
				animPeriod = 1;
				initPhase = 1;
			};
			class ani_directional
			{
				source = "user";
				animPeriod = 0.5;
				initPhase = 0;
			};
			class ani_lightbar
			{
				source = "user";
				animPeriod = 1;
				initPhase = 0;
			};
			class ani_sirens
			{
				source = "user";
				animPeriod = 0.5;
				initPhase = 0;
			};
			class slow_func
			{
				source = "user";
				animPeriod = 0.5;
				initPhase = 0;
			};
		};

		// Must be kept as fail-safe in case of issue with the function
		hiddenSelectionsTextures[]={"\A3\Weapons_F\Data\placeholder_co.paa"};	 /// we could use any texture to cover the car

		// Definition of texture sources (skins), used for the VhC (Vehicle customization)
		// Also, because the Garage uses the VhC, it will make them available from the garage
		class textureSources
		{
			class red // Source class
			{
				displayName="Red"; // name displayed, among other, from the garage
				author=$STR_A3_Bohemia_Interactive; // Author of the skin
				textures[]=// List of textures, in the same order as the hiddenSelections definition
				{
					"#(rgb,8,8,3)color(1,0,0,1)" // This is procedural texture, can be useful to set placeholder
				};
				factions[]=// This source should be available only for these factions
				{
					"OPF_F", "OPF_G_F" // Side Opfor
				};
			};
			class blue
			{
				displayName="BBBBLue";
				author=$STR_A3_Bohemia_Interactive;
				textures[]=
				{
					"#(rgb,8,8,3)color(0,0,1,1)"
				};
				factions[]=
				{
					"BLU_F", "BLU_G_F" // Side Blufor
				};
			};
			class green
			{
				displayName="Green";
				author=$STR_A3_Bohemia_Interactive;
				textures[]=
				{
					"#(rgb,8,8,3)color(0,1,0,1)"
				};
				factions[]=
				{
					"IND_F", "IND_G_F" // Side independent
				};
			};
			class yellow
			{
				displayName="Yellow power";
				author=$STR_A3_Bohemia_Interactive;
				textures[]=
				{
					"#(rgb,8,8,3)color(0,1,0,1)"
				};
				factions[]=
				{
					// Guerilla only
					"BLU_G_F",
					"OPF_G_F",
					"IND_G_F"
				};
			};
			class white
			{
				displayName="White is white";
				author="Another name";
				textures[]=
				{
					"#(rgb,8,8,3)color(1,1,1,1)"
				};
				factions[]=
				{
					"CIV_F" // side civilian
				};
			};
			class black
			{
				displayName="Dark side";
				author="Tom_48_97";
				textures[]=
				{
					"#(rgb,8,8,3)color(0,0,0,1)"
				};
				factions[]= {}; // Should be available for every factions
			};
		};
		// [_textureSourceClass1, _probability1, _textureSourceClass2, _probability2, ...]
		// Default behavior of the VhC is to select one of these sources, with a weighted random
		textureList[]=
		{
			"red", 1,
			"green", __EVAL(1/3), // You can also use EVAL to evaluate an expression
			"blue", 1,
			"black", 1
			// You can noticed that the white source is missing, therefore, it won't be part of the random
		};

		class MFD /// Clocks on the car board
		{
			class ClockHUD
			{
				#include "cfgHUD.hpp"
			};
			class MFD1
			{
				topLeft="HUD LH";
				topRight="HUD PH";
				bottomLeft="HUD LD";
				borderLeft=0.050000001;
				borderRight=0.050000001;
				borderTop=0.02;
				borderBottom=0.1;
				enableParallax=0;
				color[]={2,2,3,1};
				class Bones
				{
				};
				class Draw
				{
					color[]={2,2.0999999,3};
					class SpeedNumber
					{
						type="text";
						source="speed";
						sourceScale=3.5999999;
						align="center";
						scale=2;
						pos[]=
						{
							{0.40000001,0.1},
							1
						};
						down[]=
						{
							{0.40000001,0.51999998},
							1
						};
						right[]=
						{
							{0.60000002,0.1},
							1
						};
					};
				};
			};
		};
	};
	class Renault_Clio_Alt_base_F: Renault_Clio_base_F
	{
		hiddenSelections[] = {"camo1","camo2","camo3"}; ///we want to allow changing the color of this selection
		hiddenSelectionsTextures[]=
		{
			"#(rgb,8,8,3)color(1,0,0,1)",
			"#(rgb,8,8,3)color(0,1,0,1)",
			"#(rgb,8,8,3)color(0,0,1,1)"
		};
		class textureSources
		{
			class RedGreenBlue
			{
				displayname="Red Green Blue";
				author="You don't want to know";
				textures[]=
				{
					"#(rgb,8,8,3)color(1,0,0,1)",
					"#(rgb,8,8,3)color(0,1,0,1)",
					"#(rgb,8,8,3)color(0,0,1,1)"
				};
				factions[]={};
			};
			class BlueGreenRed
			{
				displayname="Blue Green Red";
				author="You don't want to know";
				textures[]=
				{
					"#(rgb,8,8,3)color(0,0,1,1)",
					"#(rgb,8,8,3)color(0,1,0,1)",
					"#(rgb,8,8,3)color(1,0,0,1)"
				};
				factions[]={};
			};
		};
	};
	// Derivate from the base class
	class Renault_Clio_01_F: Renault_Clio_base_F /// some class that is going to be visible in editor
	{
		scope	= 2; 			/// makes the car visible in editor
		scopeCurator=2;			// scope 2 means it's available in Zeus mode (0 means hidden)
		crew 	= "C_man_1"; 	/// we need someone to fit into the car
		side	= 3; 			/// civilian car should be on civilian side
		faction	= CIV_F;		/// and with civilian faction
	};
	// Derivate from the base class
	class Renault_Clio_01_Black_F: Renault_Clio_base_F /// some class that is going to be visible in editor
	{
		forceInGarage=1; 	// This will force the garage to display this vehicle, otherwise it won't because it shares the same p3d as the previous
		displayName="Test Car (Black)";
		scope=2; 			/// makes the car visible in editor
		scopeCurator=2;		// scope 2 means it's available in Zeus mode (0 means hidden)
		crew="C_man_1"; 	/// we need someone to fit into the car
		side=3; 			/// civilian car should be on civilian side
		faction	= CIV_F;	/// and with civilian faction
		// the texture source used will be the green one, whatever it probability because it's the only one defined here
		textureList[]=
		{
			"black", 1
		};
	};
	// Derivate from the base class
	class Renault_Clio_01_anotherVariant_F: Renault_Clio_base_F
	{
		forceInGarage=0; 	// 0 has no effect at all
		displayName="Test Car (black or white)";
		scope=2;
		scopeCurator=0;		// It isn't shown in curator UI
		crew="C_man_1";
		side=3;
		faction	= CIV_F;
		// this can be black or white
		textureList[]=
		{
			"black", 0.75,
			"white", 0.5
		};
	};
	// This car won't  be available from the editor but its class name can be used with the VhC function
	// E.g. [MyTestCar, "C_test_Car_01_white_F"] call bis_fnc_initVehicle;
	class Renault_Clio_01_white_F: Renault_Clio_base_F
	{
		forceInGarage=0; 	// 0 has no effect at all
		displayName="Test Car (white)";
		scope=1;
		scopeCurator=0;		// It isn't shown in curator UI
		crew="C_man_1";
		side=3;
		faction	= CIV_F;
		// this can be black or white
		textureList[]=
		{
			"white", 0.5
		};
	};
	// Other delivery of the car with differents hidden selections
	class Renault_Clio_01_alt_F: Renault_Clio_Alt_base_F
	{
		forceInGarage=1;
		displayName="Test Car (RGB)";
		scope	= 2;
		scopeCurator=2;
		crew 	= "C_man_1";
		side	= 3;
		faction	= CIV_F;
		textureList[]= {"RedGreenBlue",1};
	};
	class Renault_Clio_01_alt_V2_F: Renault_Clio_01_alt_F
	{
		displayName="Test Car (BGR)";
		textureList[]= {"BlueGreenRed",1};
	};
};

model.cfg

class Rotation
{
	type = "rotation";
	memory = 1;
	minValue = 0;
	maxValue = 1;
	angle0 = 0;
	angle1 = 1;
};
class CfgSkeletons
{
	class Default
	{
		isDiscrete = 1;
		skeletonInherit = "";
		skeletonBones[] = {};
	};
	class Vehicle : Default {};
	class Car : Vehicle {
		skeletonBones[]=
		{
			"drivewheel","",

			"wheel_1_1_damper_land","",
			"wheel_1_2_damper_land","",
			"wheel_1_3_damper_land","",
			"wheel_1_4_damper_land","",

			"wheel_2_1_damper_land","",
			"wheel_2_2_damper_land","",
			"wheel_2_3_damper_land","",
			"wheel_2_4_damper_land","",

			"wheel_1_1_damper","wheel_1_1_damper_land",
			"wheel_1_2_damper","wheel_1_2_damper_land",
			"wheel_1_3_damper","wheel_1_3_damper_land",
			"wheel_1_4_damper","wheel_1_4_damper_land",

			"wheel_2_1_damper","wheel_2_1_damper_land",
			"wheel_2_2_damper","wheel_2_2_damper_land",
			"wheel_2_3_damper","wheel_2_3_damper_land",
			"wheel_2_4_damper","wheel_2_4_damper_land",

			"wheel_1_1_steering","wheel_1_1_damper",
			"wheel_1_2_steering","wheel_1_2_damper",
			"wheel_1_3_steering","wheel_1_3_damper",
			"wheel_1_4_steering","wheel_1_4_damper",

			"wheel_2_1_steering","wheel_2_1_damper",
			"wheel_2_2_steering","wheel_2_2_damper",
			"wheel_2_3_steering","wheel_2_3_damper",
			"wheel_2_4_steering","wheel_2_4_damper",

			"wheel_1_1","wheel_1_1_steering",
			"wheel_1_2","wheel_1_2_steering",
			"wheel_1_3","wheel_1_3_steering",
			"wheel_1_4","wheel_1_4_steering",

			"wheel_2_1","wheel_2_1_steering",
			"wheel_2_2","wheel_2_2_steering",
			"wheel_2_3","wheel_2_3_steering",
			"wheel_2_4","wheel_2_4_steering",

			"wheel_1_1_unhide","wheel_1_1",
			"wheel_1_2_unhide","wheel_1_2",
			"wheel_1_3_unhide","wheel_1_3",
			"wheel_1_4_unhide","wheel_1_4",

			"wheel_2_1_unhide","wheel_2_1",
			"wheel_2_2_unhide","wheel_2_2",
			"wheel_2_3_unhide","wheel_2_3",
			"wheel_2_4_unhide","wheel_2_4",

			"wheel_1_1_hide","wheel_1_1",
			"wheel_1_2_hide","wheel_1_2",
			"wheel_1_3_hide","wheel_1_3",
			"wheel_1_4_hide","wheel_1_4",

			"wheel_2_1_hide","wheel_2_1",
			"wheel_2_2_hide","wheel_2_2",
			"wheel_2_3_hide","wheel_2_3",
			"wheel_2_4_hide","wheel_2_4",

			"lightbar","",
			"lightbar_axis","",
			
			"ani_sirens","",
			"sirens_axis","",
			
			"OtocVez","",
			"OtocHlaven","OtocVez",

			"damageHide","",
			"damageVez","OtocVez",
			"damageHlaven","OtocHlaven",

			"ukaz_rychlo","",
			"ukaz_rychlo2","",
			"ukaz_rpm","",
			"mph","",
			"rpm","",
			"fuel","",
			"fuel_1","",
			"fuel_01","",
			"fuel_2","",
			"fuel_3","",
			"prop_01","",
			"prop_02","",
			"prop_2","",
			"prop_1","",
			"glass1","damageHide",
			"glass2","damageHide",
			"glass3","damageHide",
			"glass4","damageHide"
		};
	};
	class civil_car: Car
	{
		skeletonInherit="Car";
		skeletonBones[]=
		{
			"reverse_light","",
			"daylights","damageHide",
			"door1","",
			"door2","",
			"glass5","damageHide"
		};
	};
	
};

class CfgModels
{
	class Default
	{
		sectionsInherit = "";
		sections[] = {};
		skeletonName = "";
	};
	class Vehicle: Default
	{
		sections[] =
		{
			"cislo",
			"grupa",
			"side",
			"sektor",
			"clan",
			"clan_sign",
			"podsvit pristroju",
			"poskozeni",
			"L svetlo",
			"P svetlo",
			"light_1",
			"light_2",
			"zasleh",
			"ani_sirens",
			"sirens_axis",
			"lightbar_axis",
			"lightbar",
			"pue_1",
			"pue_2",
			"pue_3",
			"pue_4",
			"pue_5",
			"pue_6",
			"pue_7",
			"pue_8",
			"pue_9",
			"lme_1",
			"lme_2",
			"lme_3",
			"lme_4",
			"lme_6",
			"lme_7",
			"lme_8",
			"lme_9"
		};
	};	
	
	class Car: Vehicle
	{
		htMin = 60;		// Minimum half-cooling time (in seconds)
		htMax = 180;	// Maximum half-cooling time (in seconds)
		afMax = 100;	// Maximum temperature in case the model is alive (in celsius)
		mfMax = 8;		// Maximum temperature when the model is moving (in celsius)
		mFact = 1;		// Metabolism factor - number from interval <0, 1> (0 - metabolism has no influence, 1 - metabolism has full influence (no other temperature source will be considered)).
		tBody = 150;	// Metabolism temperature of the model (in celsius)

		sections[]=
		{
			"ammo",
			"zadni svetlo",
			"brzdove svetlo",
			"spz",
			"motor",
			"body",
			"clan",
			"clan_sign",
			"zasleh",
			"Light_R",
			"Light_L",
			"light_1",
			"light_2",
			"ani_sirens",
			"podsvit pristroju",
			"glass1",
			"glass2",
			"glass3",
			"glass4",
			"glass5",
			"glass6",
			"pue_1",
			"pue_2",
			"pue_3",
			"pue_4",
			"pue_5",
			"pue_6",
			"pue_7",
			"pue_8",
			"pue_9",
			"lme_1",
			"lme_2",
			"lme_3",
			"lme_4",
			"lme_6",
			"lme_7",
			"lme_8",
			"lme_9"
		};
		skeletonName="Car";
		class Animations
		{
			// destruct START
			class damageHide
			{
				type="hide";
				source="damage";
				selection="damageHide";
				hideValue=1.0;
			};
			class damageHideVez:damageHide
			{
				selection="OtocVez";
			};
			class damageHideHlaven:damageHide
			{
				selection="OtocHlaven";
			};

			// Wheels START
			// Wheels Complete Destruct START
			class wheel_1_1_destruct
			{
				type="hide";
				selection="wheel_1_1_hide";
				source="HitLFWheel";
				minValue = 0; // upravit na 0.99
				maxValue = 1; // upravit na 1.0
				hidevalue = 0.99999;
			};
			class wheel_1_2_destruct: wheel_1_1_destruct {source="HitLBWheel";selection="wheel_1_2_hide";};
			class wheel_1_3_destruct: wheel_1_1_destruct {source="HitLMWheel";selection="wheel_1_3_hide";};
			class wheel_1_4_destruct: wheel_1_1_destruct {source="HitLF2Wheel";selection="wheel_1_4_hide";};

			class wheel_2_1_destruct: wheel_1_1_destruct {source="HitRFWheel";selection="wheel_2_1_hide";};
			class wheel_2_2_destruct: wheel_1_1_destruct {source="HitRBWheel";selection="wheel_2_2_hide";};
			class wheel_2_3_destruct: wheel_1_1_destruct {source="HitRMWheel";selection="wheel_2_3_hide";};
			class wheel_2_4_destruct: wheel_1_1_destruct {source="HitRF2Wheel";selection="wheel_2_4_hide";};

			class wheel_1_1_destruct_unhide
			{
				type="hide";
				selection="wheel_1_1_unhide";
				source="HitLFWheel";
				minValue = 0; 
				maxValue = 1; 
				hidevalue = 0.00000;
				UnHidevalue = 1.00000;
			};
			class wheel_1_2_destruct_unhide: wheel_1_1_destruct_unhide {source="HitLBWheel";selection="wheel_1_2_unhide";};
			class wheel_1_3_destruct_unhide: wheel_1_1_destruct_unhide {source="HitLMWheel";selection="wheel_1_3_unhide";};
			class wheel_1_4_destruct_unhide: wheel_1_1_destruct_unhide {source="HitLF2Wheel";selection="wheel_1_4_unhide";};

			class wheel_2_1_destruct_unhide: wheel_1_1_destruct_unhide {source="HitRFWheel";selection="wheel_2_1_unhide";};
			class wheel_2_2_destruct_unhide: wheel_1_1_destruct_unhide {source="HitRBWheel";selection="wheel_2_2_unhide";};
			class wheel_2_3_destruct_unhide: wheel_1_1_destruct_unhide {source="HitRMWheel";selection="wheel_2_3_unhide";};
			class wheel_2_4_destruct_unhide: wheel_1_1_destruct_unhide {source="HitRF2Wheel";selection="wheel_2_4_unhide";};

			// Wheels Complete Destruct END

			#define DamageOffset 0.2

			// Wheels Damage START
			class wheel_1_1_Damage: wheel_1_1_destruct
			{
				type="translation";
				axis="Basic_Damper_Destruct_Axis";
				memory=1;
				selection="wheel_1_1_damper";
				source="HitLFWheel";
				minValue = 0.0;
				maxValue = 1;
				offset0 = 0;
				offset1 = DamageOffset;
			};
			class wheel_1_2_Damage: wheel_1_1_Damage {source="HitLBWheel";selection="wheel_1_2_damper";};
			class wheel_1_3_Damage: wheel_1_1_Damage {source="HitLMWheel";selection="wheel_1_3_damper";};
			class wheel_1_4_Damage: wheel_1_1_Damage {source="HitLF2Wheel";selection="wheel_1_4_damper";};

			class wheel_2_1_Damage: wheel_1_1_Damage {source="HitRFWheel";selection="wheel_2_1_damper";};
			class wheel_2_2_Damage: wheel_1_1_Damage {source="HitRBWheel";selection="wheel_2_2_damper";};
			class wheel_2_3_Damage: wheel_1_1_Damage {source="HitRMWheel";selection="wheel_2_3_damper";};
			class wheel_2_4_Damage: wheel_1_1_Damage {source="HitRF2Wheel";selection="wheel_2_4_damper";};


			class wheel_1_1_Damper_Damage_BackAnim: wheel_1_1_Damage {selection="wheel_1_1_damper";offset1 = -1.2*DamageOffset;};
			class wheel_1_2_Damper_Damage_BackAnim: wheel_1_1_Damper_Damage_BackAnim {source="HitLBWheel";selection="wheel_1_2_damper";};
			class wheel_1_3_Damper_Damage_BackAnim: wheel_1_1_Damper_Damage_BackAnim {source="HitLMWheel";selection="wheel_1_3_damper";};
			class wheel_1_4_Damper_Damage_BackAnim: wheel_1_1_Damper_Damage_BackAnim {source="HitLF2Wheel";selection="wheel_1_4_damper";};

			class wheel_2_1_Damper_Damage_BackAnim: wheel_1_1_Damper_Damage_BackAnim {source="HitRFWheel";selection="wheel_2_1_damper";};
			class wheel_2_2_Damper_Damage_BackAnim: wheel_1_1_Damper_Damage_BackAnim {source="HitRBWheel";selection="wheel_2_2_damper";};
			class wheel_2_3_Damper_Damage_BackAnim: wheel_1_1_Damper_Damage_BackAnim {source="HitRMWheel";selection="wheel_2_3_damper";};
			class wheel_2_4_Damper_Damage_BackAnim: wheel_1_1_Damper_Damage_BackAnim {source="HitRF2Wheel";selection="wheel_2_4_damper";};

			// Wheels Damage END
			// Wheels END

				//Glass Damage START
				class Glass1_destruct
				{
					type="hide";
					selection="glass1";
					source="HitGlass1";
					minValue = 0; 
					maxValue = 1; 
					hidevalue = 0.99999;
				};
				class Glass2_destruct: Glass1_destruct {selection="glass2";source="HitGlass2";}; // Inherits from the the glass 1, only the selection and the source will be changed
				class Glass3_destruct: Glass1_destruct {selection="glass3";source="HitGlass3";};
				class Glass4_destruct: Glass1_destruct {selection="glass4";source="HitGlass4";};
				class Glass5_destruct: Glass1_destruct {selection="glass5";source="HitGlass5";};
				class Glass6_destruct: Glass1_destruct {selection="glass6";source="HitGlass6";};
				//Glass Damage END

			// destruct END
			class Fuel: Rotation
			{
				source="fuel";
				selection="fuel";
				axis="fuel_axis";
				maxValue=1;
				memory=1;
				angle0="rad -110";
				angle1=0;
			};
			class IndicatorSpeed: Rotation
			{
				source="speed";
				selection="mph";
				axis="mph_axis";
				memory=1;
				maxValue=38.900002;
				angle1="rad -265";
			};
			class IndicatorFuel: Rotation
			{
				type="rotation";
				source="fuel";
				selection="fuel_1";
				axis="fuel_1_axis";
				memory=1;
				minValue=0.000000;
				maxValue=1.000000;
				angle0=-0.087266;
				angle1=-1.658063;
			};
			class IndicatorRPM: Rotation
			{
				source="rpm";
				selection="rpm";
				axis="rpm_axis";
				memory=1;
				maxValue=38.900002;
				angle1="rad -265";
			};
			class DrivingWheel: Rotation
			{
				source="drivingWheel";
				selection="drivewheel";
				axis="drivewheel_axis";
				minValue=-0.8;
				maxValue=0.8;
				angle0=(rad 60);
				angle1=(rad -60);
			};
			class Steering_1_1
			{
				type="rotationY";
				source="drivingWheel";
				selection="wheel_1_1_steering";
				axis="wheel_1_1_steering_axis";
				memory=1;
				minValue= -0.8;
				maxValue= 0.8;
				angle0=0.8;
				angle1=-0.8;
			};
			class Steering_2_1: Steering_1_1
			{
				selection="wheel_2_1_steering";
				axis="wheel_2_1_steering_axis";
			};
			class Wheel_1_1
			{
				type="rotationX";
				source="wheel";
				selection="wheel_1_1";
				axis="wheel_1_1_axis";
				memory=1;
				sourceAddress="loop";
				minValue=0;
				maxValue=1;
				angle0=0;
				angle1="rad -360";
			};
			class wheel_2_1: Wheel_1_1
			{
				selection="wheel_2_1";
				axis="wheel_2_1_axis";
			};
			class wheel_1_2: Wheel_1_1
			{
				selection="wheel_1_2";
				axis="wheel_1_2_axis";
			};
			class Wheel_2_2: Wheel_1_1
			{
				selection="wheel_2_2";
				axis="wheel_2_2_axis";
			};
			class Wheel_1_1_Damper
			{
				type="translation";
				source="damper";
				selection="wheel_1_1_damper_land";
				axis="posun wheel_1_1";
				animPeriod = 1;
				minValue="0";
				maxValue="1";
				offset0= "0.5";
				offset1= "-0.5";
				memory=1;
			};
			class wheel_2_1_Damper: Wheel_1_1_Damper
			{
				selection="wheel_2_1_damper_land";
			};
			class wheel_1_2_Damper: Wheel_1_1_Damper
			{
				selection="wheel_1_2_damper_land";
			};
			class Wheel_2_2_Damper: Wheel_1_1_Damper
			{
				selection="wheel_2_2_damper_land";
			};
			class daylights
			{
				type="hide";
				source="rpm";
				selection="daylights";
				minValue=-0.8;
				maxValue=0.2;
				unhidevalue=1;
				sourceAddress="clamp";
			};
			
			class reverse_light
			{
				type="Hide";
				selection="reverse_light";
				sourceAddress="clamp";
				source="Gear";
				minValue = -1;
				maxValue = 0;
				hideValue = "0.2";	
			};
			class ani_lightbar
			{
				type="rotation";
				source="user";
				memory=1;
				animPeriod=0;
				selection="lightbar";
				axis="lightbar_axis";
				minValue=0;
				maxValue=1000;
				minPhase=0;
				maxPhase=1000;
				angle0=0;
				angle1=0;
			};
			class ani_directional
			{
				type="rotation";
				source="user";
				memory=1;
				animPeriod=0;
				selection="directional";
				axis="directional_axis";
				minValue=0;
				maxValue=1000;
				minPhase=0;
				maxPhase=1000;
				angle0=0;
				angle1=0;
			};
			class ani_Sirens
			{
				source="slow_func";
				type="rotation";
				animPeriod=0.5;
				selection="ani_sirens";
				axis="siren_axis";
				angle0=0;
				angle1="- 1.6";
			};
		};
	};
	
	class Renault_Clio: Car
	{
		skeletonName = "civil_car";
		sectionsInherit = "Car";
		sections[]=
		{
			"Camo1",
			"brzdove svetlo",
			"body",
			"karoserie",
			"palivo",
			"pue_1",
			"pue_2",
			"pue_3",
			"pue_4",
			"pue_5",
			"pue_6",
			"pue_7",
			"pue_8",
			"pue_9",
			"lme_1",
			"lme_2",
			"lme_3",
			"lme_4",
			"lme_6",
			"lme_7",
			"lme_8",
			"lme_9",
			"ani_sirens",
			"sirens_axis",
			"lightbar_axis",
			"lightbar", "",
		};
		class Animations: Animations
		{
			class wheel_1_1_Damage: wheel_1_1_Damage{offset1=0.18000001;};
			class wheel_1_2_Damage: wheel_1_2_Damage{offset1=0.18000001;};
			class wheel_2_1_Damage: wheel_2_1_Damage{offset1=0.18000001;};
			class wheel_2_2_Damage: wheel_2_2_Damage{offset1=0.18000001;};
			
			class wheel_1_1_Damper_Damage_BackAnim: wheel_1_1_Damper_Damage_BackAnim{offset1=-0.18000001;};
			class wheel_1_2_Damper_Damage_BackAnim: wheel_1_2_Damper_Damage_BackAnim{offset1=-0.18000001;};
			class wheel_2_1_Damper_Damage_BackAnim: wheel_2_1_Damper_Damage_BackAnim{offset1=-0.18000001;};
			class wheel_2_2_Damper_Damage_BackAnim: wheel_2_2_Damper_Damage_BackAnim{offset1=-0.18000001;};
			
			class DrivingWheel
			{
				type="rotation";
				source="drivingWheel";
				selection="drivewheel";
				axis="drivewheel_axis";
				memory=1;
				minValue=-0.8;
				maxValue=0.8;
				angle0=(rad 60);
				angle1=(rad -60);
			};
			class Steering_1_1
			{
				type="rotationY";
				source="drivingWheel";
				selection="wheel_1_1_steering";
				axis="wheel_1_1_steering_axis";
				memory=1;
				minValue="rad -60";
				maxValue="rad +60";
				angle0=0.8;
				angle1=-0.8;
			};
			class Steering_2_1: Steering_1_1
			{
				selection="wheel_2_1_steering";
				axis="wheel_2_1_steering_axis";
				angle0=0.8;
				angle1=-0.8;
			};
			class IndicatorSpeed: Rotation
			{
				source="speed";
				selection="mph";
				axis="mph_axis";
				memory=1;
				maxValue=28;
				angle0=0.17453299;
				angle1=-3.141593;
			};
			class IndicatorRPM: Rotation
			{
				type="rotation";
				source="rpm";
				selection="rpm";
				axis="rpm_axis";
				memory=1;
				minValue=0;
				maxValue=7000;
				angle0=(rad 0);
				angle1=(rad -250);
			};				
			class fuel
			{
				type="rotation";
				source="fuel";
				selection="fuel";
				axis="fuel_axis";
				memory=1;
				minValue=0;
				maxValue=1;
				angle0=0;
				angle1="rad +120";
			};
			class prop_01
			{
				type="rotation";
				source="rpm";
				selection="prop_1";
				axis="prop_1_axis";
				memory=1;
				minValue=1000;
				maxValue=7000;
				angle0="rad 30";
				angle1="rad 35";
			};
			
			class daylights
			{
				type="hide";
				source="rpm";
				selection="daylights";
				minValue=-0.8;
				maxValue=0.2;
				unhidevalue=1;
				sourceAddress="clamp";
			};
			
			class reverse_light
			{
				type="Hide";
				selection="reverse_light";
				sourceAddress="clamp";
				source="Gear";
				minValue = -1;
				maxValue = 0;
				hideValue = "0.2";	
			};
			
			class ani_lightbar
			{
				type="rotation";
				source="user";
				memory=1;
				animPeriod=0;
				selection="lightbar";
				axis="lightbar_axis";
				minValue=0;
				maxValue=1000;
				minPhase=0;
				maxPhase=1000;
				angle0=0;
				angle1=0;
			};
			class ani_directional
			{
				type="rotation";
				source="user";
				memory=1;
				animPeriod=0;
				selection="directional";
				axis="directional_axis";
				minValue=0;
				maxValue=1000;
				minPhase=0;
				maxPhase=1000;
				angle0=0;
				angle1=0;
			};
			class ani_Sirens
			{
				source="slow_func";
				type="rotation";
				animPeriod=0.5;
				selection="ani_sirens";
				axis="siren_axis";
				angle0=0;
				angle1="- 1.6";
			};
			
			class damageHidedoor1: damageHide
			{
				selection="door1";
			};
			class damageHidedoor2: damageHide
			{
				selection="door2";
			};	
			
			class Glass5_destruct
			{
				type="hide";
				selection="glass5";
				source="HitGlass5";
				minValue = 0;
				maxValue = 1;
				hidevalue = 0.99999;
			};	
			class Wheel_1_1_Damper: Wheel_1_1_Damper
			{
				type="translation";
				source="damper";
				selection="wheel_1_1_damper_land";
				axis="posun wheel_1_1";
				animPeriod = 1;
				minValue="0";
				maxValue="1";
				offset0= "0.5";
				offset1= "-0.5";
				memory=1;
			};
			class wheel_2_1_Damper: Wheel_1_1_Damper
			{
				selection="wheel_2_1_damper_land";			
			};
			class wheel_1_2_Damper: Wheel_1_1_Damper
			{
				selection="wheel_1_2_damper_land";						
			};
			class Wheel_2_2_Damper: Wheel_1_1_Damper
			{
				selection="wheel_2_2_damper_land";		
			};			
		};
	};
};

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

×