Page MenuHomeFeedback Tracker

[CLOSED] setObjectTexture bug, turning textures off again
Closed, ResolvedPublic

Description

Well i have created a lightbar as you can see in the picture. It is topology closed and convex closed. It have 758 faces and what i do is setting a texture of light in the different faces of the lightbar via a script.

All the selections are:
pue_1,pue_2,pue_3,pue_4,pue_5,pue_6,pue_7
The selections are listed in hiddenSelections array and in model.cfg

Config.cpp

#include "basicdefines_A3.hpp"
class DefaultEventhandlers;

#include "CfgPatches.hpp"

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

class CfgSounds
{
	sounds[]= {"sirena_mike1","sirena_mike2","sirena_mike3","sirena_mike4","horn1"};
	
	class sirena_mike1
	{
		name = "sirena_mike1";
		sound[] = {"renault clio\sounds\sirena_mike1.ogg",1,1};
		titles[] = {};
	};
	class sirena_mike2
	{
		name = "sirena_mike2";
		sound[] = {"renault clio\sounds\sirena_mike2.ogg",1,1};
		titles[] = {};
	};
	class sirena_mike3
	{
		name = "sirena_mike3";
		sound[] = {"renault clio\sounds\sirena_mike3.ogg",1,1};
		titles[] = {};
	};
	class sirena_mike4
	{
		name = "sirena_mike4";
		sound[] = {"renault clio\sounds\sirena_mike4.ogg",1,1};
		titles[] = {};
	};
	class horn1
	{
		name = "horn1";
		sound[] = {"renault clio\sounds\horn1.ogg",1,1};
		titles[] = {};
	};
};

class CfgWeapons
{

	class Default {};

	class CarHorn: Default {};

	class CHorn: CarHorn {

		displayNameMagazine=CHorn;

		shortNameMagazine=CHorn;

		scopeWeapon=public;

		scopeMagazine=public;

		drySound[]={"renault clio\sounds\horn1.ogg",1,1};

		soundContinuous=1

	};
};

class CfgVehicles
{
	class Car;
	class Car_F: Car
	{
		class HitPoints
		{
			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";
		picture	= "\A3\Weapons_F\Data\placeholder_co.paa";
		Icon	= "\A3\Weapons_F\Data\placeholder_co.paa";

		displayName = "Renault Clio";

		hiddenSelections[] = {"pue_1","pue_2","pue_3","pue_4","pue_5","pue_6","pue_7","intermitente_izq","intermitente_dch"};
		
		//					  ||0||   ||1||   ||2||     ||3||   ||4||  |51||   ||6|| 
		terrainCoef 	= 6.5;
		turnCoef 		= 2.5;
		precision 		= 10;
		brakeDistance 	= 3.0;
		acceleration 	= 18;

		fireResistance 	= 5;
		armor 			= 32;
		cost			= 50000;

		transportMaxBackpacks 	= 3;
		transportSoldier 		= 3;

		wheelDamageRadiusCoef 	= 0.9;
		wheelDestroyRadiusCoef 	= 0.4;
		maxFordingDepth 		= 0.5;
		waterResistance 		= 1;
		crewCrashProtection		= 0.25;
		driverLeftHandAnimName 	= "drivewheel";
		driverRightHandAnimName = "drivewheel";

		weapons[] = {"CHorn"};
		
		class TransportItems
		{
			item_xx(FirstAidKit,4);
		};

		class Turrets{};
		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;
		cargoAction[] 		= {passenger_low01, passenger_generic01_leanleft, passenger_generic01_foldhands};
		getInAction 		= GetInLow;
		getOutAction 		= GetOutLow;
		cargoGetInAction[] 	= {"GetInLow"};
		cargoGetOutAction[] = {"GetOutLow"};

		#include "sounds.hpp"
		#include "physx.hpp"

		class PlayerSteeringCoefficients
		{
			 turnIncreaseConst 	= 0.3;
			 turnIncreaseLinear = 1.0;
			 turnIncreaseTime 	= 1.0;

			 turnDecreaseConst 	= 5.0;
			 turnDecreaseLinear = 3.0;
			 turnDecreaseTime 	= 0.0;

			 maxTurnHundred 	= 0.7;
		};

		memoryPointTrackFLL = "TrackFLL";
		memoryPointTrackFLR = "TrackFLR";
		memoryPointTrackBLL = "TrackBLL";
		memoryPointTrackBLR = "TrackBLR";
		memoryPointTrackFRL = "TrackFRL";
		memoryPointTrackFRR = "TrackFRR";
		memoryPointTrackBRR = "TrackBRR";

		class Exhausts
		{
			class Exhaust1
			{
				position 	= "exhaust1";
				direction 	= "exhaust1_dir";
				effect 		= "ExhaustsEffect";
			};

			class Exhaust2
			{
				position 	= "exhaust2_pos";
				direction 	= "exhaust2_dir";
				effect 		= "ExhaustsEffect";
			};
		};
		
		class RenderTargets
		{
			class LeftMirror
			{
				renderTarget = "rendertarget0";
				class CameraView1
				{
					pointPosition = "PIP0_pos";
					pointDirection = "PIP0_dir";
					renderQuality = 3;
					renderVisionMode = 0;
					fov = 0.7;
				};
			};
			class RearCam
			{
				renderTarget = "rendertarget1";
				class CameraView1
				{
					pointPosition = "PIP1_pos";
					pointDirection = "PIP1_dir";
					renderQuality = 3;
					renderVisionMode = 0;
					fov = 0.7;
				};
			};
			class FrontCam
			{
				renderTarget = "rendertarget2";
				class CameraView1
				{
					pointPosition = "PIP2_pos";
					pointDirection = "PIP2_dir";
					renderQuality = 3;
					renderVisionMode = 0;
					fov = 0.7;
				};
			};
		};

		class Reflectors
		{
			class LightCarHeadL01
			{
				color[] 		= {1900, 1800, 1700};	
				ambient[]		= {5, 5, 5};				
				position 		= "LightCarHeadL01";		
				direction 		= "LightCarHeadL01_end";	
				hitpoint 		= "Light_L";				
				selection 		= "Light_L";				
				size 			= 1;						
				innerAngle 		= 100;						
				outerAngle 		= 179;						
				coneFadeCoef 	= 10;						
				intensity 		= 1;						
				useFlare 		= true;						
				dayLight 		= false;					
				flareSize 		= 1.0;						

				class Attenuation
				{
					start 			= 1.0;
					constant 		= 0;
					linear 			= 0;
					quadratic 		= 0.25;
					hardLimitStart 	= 30;		
					hardLimitEnd 	= 60;		
				};
			};

			class LightCarHeadL02: LightCarHeadL01
			{
				position 	= "LightCarHeadL02";
				direction 	= "LightCarHeadL02_end";
				FlareSize 	= 0.5;						
			};

			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;
			};
			class Foco_1
			{
				color[]={1300,1300,2200};
				ambient[]={0,0,1};
				intensity=2;
				size=1;
				innerAngle=5;
				outerAngle=45;
				coneFadeCoef=3;
				position="Foco_01_pos";
				direction="Foco_01_dir";
				hitpoint="lp_11";
				selection="lp_11";
				useFlare=true;
				flareSize=1;
				dayLight=1;
				class Attenuation
				{
					start=50;
					constant=0;
					linear=0;
					quadratic=0.25;
					hardLimitStart=50;
					hardLimitEnd=80;
				};
			};
			class Foco_2: Foco_1
			{
				position="Foco_02_pos";
				direction="Foco_02_dir";
				hitpoint="lp_7";
				selection="lp_7";
			};
			class Foco_3: Foco_1
			{
				position="Foco_03_pos";
				direction="Foco_03_dir";
				hitpoint="lm_10";
				selection="lm_10";
			};
			class Foco_4: Foco_1
			{
				position="Foco_04_pos";
				direction="Foco_04_dir";
				hitpoint="lm_5";
				selection="lm_5";
			};
			class Foco_5: Foco_1
			{
				position="Foco_05_pos";
				direction="Foco_05_dir";
				hitpoint="l_6";
				selection="l_6";
			};
			class Foco_6: Foco_1
			{
				position="Foco_06_pos";
				direction="Foco_06_dir";
				hitpoint="l_4";
				selection="l_4";
			};
		};

		aggregateReflectors[] = {{"LightCarHeadL01", "LightCarHeadL02"}, {"LightCarHeadR01", "LightCarHeadR02"}, {"Foco_1", "Foco_2", "Foco_3", "Foco_4", "Foco_5", "Foco_6"}};

		class EventHandlers: EventHandlers
		{
			init = "_this execVM '\renault clio\scripts\init.sqf';";
		};
		
		class UserActions
		{
			class IntermitenteIzq {
				displayName = "<t color='#FCA304'>Intermitente izquierdo (Q)</t>";
				displayNameDefault="<img image='renault clio\iconos\blinker.paa' size='1.8'/>";
				position = "drivewheel";
				radius = 10;
				condition = "driver this == player && (this animationPhase 'ani_intermitentes' != 0.1)";
				statement = "this animate ['ani_intermitentes', 0.1]";
				shortcut="LeanLeft";
				onlyForplayer = 0;
			};
			
			class OffIzq {
				displayName = "<t color='#FCA304'>Apagar intermitentes</t>";
				displayNameDefault="<img image='renault clio\iconos\blinker.paa' size='1.8'/>";
				position = "drivewheel";
				radius = 10;
				condition = "driver this == player && (this animationPhase 'ani_intermitentes' == 0.1)";
				statement = "this animate ['ani_intermitentes', 0]";
				shortcut="LeanLeft";
				onlyForplayer = 0;
			};

			
			class IntermitenteDch {
				displayName = "<t color='#FCA304'>Intermitente derecho (E)</t>";
				displayNameDefault="<img image='renault clio\iconos\blinker.paa' size='1.8'/>";
				position = "drivewheel";
				radius = 10;
				condition = "driver this == player && (this animationPhase 'ani_intermitentes' != 0.2)";
				statement = "this animate ['ani_intermitentes', 0.2]";
				shortcut="LeanRight";
				onlyForplayer = 0;
			};
	
			class OffDch {
				displayName = "<t color='#FCA304'>Apagar intermitentes</t>";
				displayNameDefault="<img image='renault clio\iconos\blinker.paa' size='1.8'/>";
				position = "drivewheel";
				radius = 10;
				condition = "driver this == player && (this animationPhase 'ani_intermitentes' == 0.2)";
				statement = "this animate ['ani_intermitentes', 0]";
				shortcut="LeanRight";
				onlyForplayer = 0;
			};
			
			class IntermitenteEmergencia {
				displayName = "<t color='#FCA304'>Intermitentes emergencia</t>";
				displayNameDefault="<img image='renault clio\iconos\blinker.paa' size='1.8'/>";
				position = "drivewheel";
				radius = 10;
				condition = "driver this == player && (this animationPhase 'ani_intermitentes' != 0.3)";
				statement = "this animate ['ani_intermitentes', 0.3]";
				shorcut="NextWeapon";
				onlyForplayer = 0;
			};
			
			class OffEmergencia {
				displayName = "<t color='#FCA304'>Apagar intermitentes</t>";
				displayNameDefault="<img image='renault clio\iconos\blinker.paa' size='1.8'/>";
				position = "drivewheel";
				radius = 10;
				condition = "driver this == player && (this animationPhase 'ani_intermitentes' == 0.3)";
				statement = "this animate ['ani_intermitentes', 0]";
				shorcut="NextWeapon";
				onlyForplayer = 0;
			};
			class Activarsirena
			{
				displayName = "<t color='#a40000'>Activar sirena</t>";
				displayNameDefault="<img image='renault clio\iconos\siren_on.paa' size='1.8'/>";
				position = "drivewheel";
				radius = 10;
				condition = "driver this == player && (this animationPhase 'ani_sirens' == 0)";
				statement = "this animate ['ani_sirens', 1]";
				onlyForplayer = 1;
			};
			class Desactivarsirena
			{
				displayName = "<t color='#ff0000'>Apagar sirena</t>";
				displayNameDefault="<img image='renault clio\iconos\siren_off.paa' size='1.8'/>";
				position = "drivewheel";
				radius = 10;
				condition = "driver this == player && (this animationPhase 'ani_sirens' >= 0.5)";
				statement = "this animate ['ani_sirens', 0]"; 
				onlyForplayer = 1;
			};
			class ApagarLEDS
			{
				displayName = "<t color='#a40000'>Apagar LEDs</t>";
				displayNameDefault="<img image='renault clio\iconos\led.paa' size='1.8'/>";
				position = "drivewheel";
				radius = 10;
				priority=98;
				condition = "driver this == player && (this animationPhase 'ani_leds' >=  0.1)";
				statement = "this animate ['ani_leds', 0]; this animate ['panel', 0];";
				onlyForplayer = 1;
			};
			class DirIzq
			{
				displayName = "<t color='#a40000'>Direccional izquierda</t>";
				displayNameDefault="<img image='renault clio\iconos\direccional_izq.paa' size='1.8'/>";
				position = "drivewheel";
				radius = 10;
				priority=98;
				condition = "driver this == player && (this animationPhase 'ani_leds' !=  0.3)"; 
				statement = "this animate ['ani_leds', 0.3]; this animate ['panel', 1];";
				onlyForplayer = 1;
			};
			class DirDch
			{
				displayName = "<t color='#a40000'>Direccional derecha</t>";
				displayNameDefault="<img image='renault clio\iconos\direccional_dch.paa' size='1.8'/>";
				position = "drivewheel";
				radius = 10;
				priority=98;
				condition = "driver this == player && (this animationPhase 'ani_leds' !=  0.4)";
				statement = "this animate ['ani_leds', 0.4]; this animate ['panel', 1];";
				onlyForplayer = 1;
			};
			class ApagarLED
			{
				displayName = "<t color='#a40000'>Apagar luces</t>";
				displayNameDefault="<img image='renault clio\iconos\puente_off.paa' size='1.8'/>";
				position = "lightbar_axis";
				radius = 10;
				condition = "driver this == player && (this animationPhase 'ani_lightbar' !=  0)"; 
				statement = "this animate ['ani_lightbar', 0];";
				onlyForplayer = 1;
			};
			class LED 
			{
				displayName = "<t color='#a40000'>Luces de posicion</t>";
				displayNameDefault="<img image='renault clio\iconos\puente_on.paa' size='1.8'/>";
				position = "lightbar_axis";
				radius = 10;
				condition = "driver this == player && (this animationPhase 'ani_lightbar' !=  0.1)"; 
				statement = "this animate ['ani_lightbar', 0.1]";
				onlyForplayer = 1;
			};
			class LED1
			{
				displayName = "<t color='#a40000'>Luces intermitentes</t>";
				displayNameDefault="<img image='renault clio\iconos\puente_on.paa' size='1.8'/>";
				position = "lightbar_axis";
				radius = 10;
				condition = "driver this == player && (this animationPhase 'ani_lightbar' !=  0.2)";
				statement = "this animate ['ani_lightbar', 0.2]";
				onlyForplayer = 1;
			};
			class LED2
			{
				displayName = "<t color='#a40000'>Luces de alto</t>";
				displayNameDefault="<img image='renault clio\iconos\puente_on.paa' size='1.8'/>";
				position = "lightbar_axis";
				radius = 10;
				condition = "driver this == player && (this animationPhase 'ani_lightbar' !=  0.3)";
				statement = "this animate ['ani_lightbar', 0.3]; this animate ['panel', 1]; this animate ['ani_leds', 0.1];";
				onlyForplayer = 1;
			};
			class LED3
			{
				displayName = "<t color='#a40000'>Luces de alerta</t>";
				displayNameDefault="<img image='renault clio\iconos\puente_on.paa' size='1.8'/>";
				position = "lightbar_axis";
				radius = 10;
				condition = "driver this == player && (this animationPhase 'ani_lightbar' !=  0.4)";
				statement = "this animate ['ani_lightbar', 0.4];";
				onlyForplayer = 1;
			};
			class foco_delant
			{
				displayName="Encender Focos delanteros";
				displayNameDefault="<img image='renault clio\iconos\foco_on.paa' size='1.8'/>";
				position="drivewheel";
				radius=2;
				priority=98;
				onlyforplayer=0;
				condition="driver this == player && (this getHit ""lp_11"" == 1 OR this getHit ""lp_7"" == 1)";
				statement="[this] execVM ""\renault clio\scripts\focodelant.sqf""";
			};
			class foco_detras
			{
				displayName="Encender Focos traseros";
				displayNameDefault="<img image='renault clio\iconos\foco_on.paa' size='1.8'/>";
				position="drivewheel";
				radius=2;
				priority=98;
				onlyforplayer=0;
				condition="driver this == player && (this getHit ""lm_10"" == 1 OR this getHit ""lm_5"" == 1)";
				statement="[this] execVM ""\renault clio\scripts\focoatras.sqf""";
			};
			class foco_izq
			{
				displayName="Encender Focos izquierda";
				displayNameDefault="<img image='renault clio\iconos\foco_on.paa' size='1.8'/>";
				position="drivewheel";
				radius=2;
				priority=98;
				onlyforplayer=0;
				condition="driver this == player && (this getHit ""l_6"" == 1)";
				statement="[this] execVM ""\renault clio\scripts\focoizq.sqf""";
			};
			class foco_dch
			{
				displayName="Encender Focos derecha";
				displayNameDefault="<img image='renault clio\iconos\foco_on.paa' size='1.8'/>";
				position="drivewheel";
				radius=2;
				priority=98;
				onlyforplayer=0;
				condition="driver this == player && (this getHit ""l_4"" == 1)";
				statement="[this] execVM ""\renault clio\scripts\focodch.sqf""";
			};
			class foco_off
			{
				displayName="Apagar Focos";
				displayNameDefault="<img image='renault clio\iconos\foco_off.paa' size='1.8'/>";
				position="drivewheel";
				radius=2;
				priority=94;
				onlyforplayer=0;
				condition="driver this == player && (this getHit ""lp_11"" == 0 OR this getHit ""lp_7"" == 0 OR this getHit ""l_6"" == 0 OR this getHit ""l_4"" == 0 OR this getHit ""lm_10"" == 0 OR this getHit ""lm_5"" == 0)";
				statement="[this] execVM ""\renault clio\scripts\focoff.sqf""";
			};
		};
		
		
		class AnimationSources: AnimationSources
		{
			class ani_intermitentes
			{
				source = "user";
				animPeriod = 0;
				initPhase = 0;
			};
			class ani_leds
			{
				source = "user";
				animPeriod = 0.5;
				initPhase = 0;
			};
			class ani_lightbar
			{
				source = "user";
				animPeriod = 0;
				initPhase = 0;
			};
			class ani_radar
			{
				source = "user";
				animPeriod = 0;
				initPhase = 0;
			};
			class ani_sirens
			{
				source = "user";
				animPeriod = 0;
				initPhase = 0;
			};
		};

		class MFD
		{
			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_cnp_F: Renault_Clio_base_F
	{
		hiddenSelections[] = {"pue_1","pue_2","pue_3","pue_4","pue_5","pue_6","pue_7","intermitente_izq","intermitente_dch"};
		
		//					  ||0||   ||1||   ||2||     ||3||   ||4||  |5||   ||6||  

		scope	= 2; 			
		scopeCurator=2;			
		crew 	= "C_man_1"; 	
		side	= 3; 			
		faction	= CIV_F;		
	};
};

Lightbar script go to case 4 that´s what we are using in the video

//Luz izquierda azul: pue_1
//Luz derecha azul: pue_2
//Luces blancas y laterales: pue_3
//Luz roja delante: pue_4
//Luz roja atras: pue_5
//Luces azules laterales: pue_6
//Luces Naranjas Traseras: lme_1,_2,_3,_4,_6,_7,_8,_9

private["_car","_lights","_lightson","_light1","_light2"];
_car = _this;
_lights = "\renault clio\puente\textures\lanzadestellos.paa";
_lightson = "\renault clio\puente\textures\lanzadestellos_on.paa";

_light1 = "#lightpoint" createVehicle getpos _car;
_light1 setLightBrightness 0;
_light1 lightAttachObject [_car,[-2,3,-0.5]]; 
_light1 setLightcolor[0,0,5];
_light2 = "#lightpoint" createVehicle getpos _car;
_light2 setLightBrightness 0;
_light2 lightAttachObject [_car,[2,-2.5,-0.5]];
_light2 setLightcolor[0,0,5];

_car setObjectMaterial [0, "\a3\data_f\default.rvmat"];
_car setObjectMaterial [1, "\a3\data_f\default.rvmat"];
_car setObjectMaterial [2, "\a3\data_f\default.rvmat"];
_car setObjectMaterial [3, "\a3\data_f\default.rvmat"];
_car setObjectMaterial [4, "\a3\data_f\default.rvmat"];
_car setObjectMaterial [5, "\a3\data_f\default.rvmat"];
_car setObjectMaterial [6, "\a3\data_f\default.rvmat"];

while {alive _car} do {

	_phase = _car animationPhase "ani_lightbar";

	switch (_phase) do {
		
		case (0): { //Apagadas
			_light1 setLightBrightness 0;
			_light2 setLightBrightness 0;
			
			_car sethit ["LF", 1];
			_car sethit ["LR", 1];
		
			_car setObjectTextureGlobal [0,_lights];
			_car setObjectTextureGlobal [1,_lights];
			_car setObjectTextureGlobal [2,_lights];
			_car setObjectTextureGlobal [3,_lights];
			_car setObjectTextureGlobal [4,_lights];
			_car setObjectTextureGlobal [5,_lights];
			_car setObjectTextureGlobal [6,_lights];
		};
		
		case (0.1): { //Posicion
			_car setObjectTextureGlobal [0,_lightson];
			_car setObjectTextureGlobal [1,_lightson];
			_car setObjectTextureGlobal [0,_lightson];
			_car setObjectTextureGlobal [1,_lightson];
			
			_car sethit ["LF", 1];
			_car sethit ["LR", 1];

			_light2 lightAttachObject [_car,[2,0.5,-0.5]];
			_light2 setLightBrightness 0.15;

			_light1 lightAttachObject [_car,[-2,0.5,-0.5]];
			_light1 setLightBrightness 0.15;
		};
		
		case (0.2): { //Intermitente
			_car setObjectTextureGlobal [0,_lightson];
			sleep 0.5;
		
			_car setObjectTextureGlobal [0,_lights];
			_car setObjectTextureGlobal [1,_lightson];
			sleep 0.5;
			
			_car setObjectTextureGlobal [1,_lights];
			
		};
		
		case (0.3): { //Dar el alto
			_car setObjectTextureGlobal [27,""];
			_car setObjectTextureGlobal [28,""];
	
			_car setObjectTextureGlobal [0,_lights];
			_car setObjectTextureGlobal [29, "#(rgb,8,8,3)color(0,0,0.627451,0.7)"];
			_car setObjectTextureGlobal [28,"#(rgb,8,8,3)color(0,0,0.627451,0.7)"];
			_car sethit ["LF", 0];
			
			_light1 lightAttachObject [_car,[-2,0.5,-0.5]];
			_light1 setLightBrightness 0.15;
			
			sleep 0.1;		
			
			_car setObjectTextureGlobal [2,_lights];
			
			sleep 0.1;
			
			_car setObjectTextureGlobal [2,""];
			
			sleep 0.1;
			
			_car setObjectTextureGlobal [2,_lights];
			
			sleep 0.1;
			
			_car setObjectTextureGlobal [0,""];
			_car setObjectTextureGlobal [29,""];
			_car setObjectTextureGlobal [28,""];
			_light1 setLightBrightness 0;
			_car sethit ["LF", 1];
			_car sethit ["LR", 0];
			_car setObjectTextureGlobal [1,_lights];
			_car setObjectTextureGlobal [30,"#(rgb,8,8,3)color(0,0,0.627451,0.7)"];
			_car setObjectTextureGlobal [27,"#(rgb,8,8,3)color(0,0,0.627451,0.7)"];
			
			
			_light2 lightAttachObject [_car,[2,0.5,-0.5]];
			_light2 setLightBrightness 0.15;
			
			sleep 0.1;
			
			_car setObjectTextureGlobal [2,""];
			
			sleep 0.1;
			
			_car setObjectTextureGlobal [1,""];
			_car setObjectTextureGlobal [30,""];
			_car setObjectTextureGlobal [27,""];
			_light2 setLightBrightness 0;
			_car sethit ["LR", 1];
			
		};
		
		case (0.4): { //Alerta
			
			_car setObjectTextureGlobal [0,_lightson];
			_car setObjectTextureGlobal [1,_lightson];
			_car setObjectTextureGlobal [3,_lightson];
			_car setObjectTextureGlobal [4,_lightson];
			_car setObjectTextureGlobal [5,_lightson];
			_car setObjectTextureGlobal [6,_lightson];
		};
	};
};

What i saw is that ingame the selections from 0 to 2 are working fine, after 2 they´re bugging
They start blinking my guess is that (case 4) the code set the texture and after that the engine turn it off.

I´ve made a debug too to check the textures in the video and as you can see textures of hiddenSelection array from 0 to 2 remain with the texture. The ones left no.

Bug test HERES THE VIDEO

Details

Severity
None
Resolution
No Bug
Reproducibility
Have Not Tried
Operating System
Windows 7
Operating System Version
x64
Category
Scripting

Event Timeline

miguel93041 updated the task description. (Show Details)

IT´S NOT AN ARMA 3 PROBLEM, IT´S SOMETHING IN CONFIG.

I close topic

miguel93041 renamed this task from setObjectTexture bug, turning textures off again to [CLOSED] setObjectTexture bug, turning textures off again.Mar 4 2017, 8:38 PM
miguel93041 changed Severity from Minor to None.
miguel93041 removed a subscriber: miguel93041.
razazel changed Resolution from Open to No Bug.Mar 6 2017, 11:17 AM
razazel closed this task as Resolved.Mar 6 2017, 2:06 PM