Jump to content
  • 0

How to set object texture back to default


Mikeeeyy

Question

17 answers to this question

Recommended Posts

  • 0

Remove the line you pasted above to change the colour of the vehicle inthe first place.

 

Basically, Reverse any steps you did to change the colours.

 

Incorrect, i think there is no way to remove it ingame. 

 

He wants like forexample to reset it when a player is like MEH, i liked the old one better

Link to comment
Share on other sites

  • 0

Can you get the original texture from the vehicles config? Or create a 'blank' texture to replace it with, not messed much with these but would a transparent texture work? 

 

Am not really the man to ask I prefer sqf and Fsm :) I know where I am with code.. lost in an unknown sea.

Link to comment
Share on other sites

  • 0

Can you get the original texture from the vehicles config? Or create a 'blank' texture to replace it with, not messed much with these but would a transparent texture work?

Am not really the man to ask I prefer sqf and Fsm :) I know where I am with code.. lost in an unknown sea.

That's what I was hoping for, a way of getting the textures from the vehicle config but I couldn't find anything, oh well.

Link to comment
Share on other sites

  • 0

That's what I was hoping for, a way of getting the textures from the vehicle config but I couldn't find anything, oh well.

 

Well, maybe you gotta look harder ^^

 

You should not look in your client code anyways:

 

The following github has every file uncompiled, easy to go trough ^^

 

https://github.com/vbawol/DayZ-Epoch/tree/master/SQF/dayz_code

 

The following code you find in this file:

 

https://github.com/vbawol/DayZ-Epoch/blob/master/SQF/dayz_code/Configs/CfgVehicles/LAND/Ural.hpp

class Ural_Base;
class UralCivil_DZE : Ural_Base {
	scope = 2;
	side = 3;
	faction = "CIV";
	displayName = "Ural (Civil)";
	vehicleClass = "Car";
	crew = "";
	typicalCargo[] = {};
	class TransportMagazines{};
	class TransportWeapons{};
	model = "\ca\wheeled\ural";
	picture = "\Ca\wheeled\data\ico\ural_civil1_CA.paa";
	rarityUrban = 0.3;
	accuracy = 0.22;
	hiddenSelectionsTextures[] = {
		"\ca\wheeled\data\ural_kabina_civ1_co.paa",
		"\ca\wheeled\data\ural_plachta_civ1_co.paa"
	};
};

more in pacticular

hiddenSelectionsTextures[] = {
		"\ca\wheeled\data\ural_kabina_civ1_co.paa",
		"\ca\wheeled\data\ural_plachta_civ1_co.paa"
	};

Now how would u call this data?

_vehicleName = "UralCivil_DZE";
_textureArray = getArray(configFile >> "CfgVehicles" >> _vehicleName >> "hiddenSelectionsTextures[])"; 
// could also be hiddenSelectionsTextures without the []

_counter = 0;
{
_vehicle setObjectTexture [_counter , _x];
_counter = _counter + 1 ;
}forEach _textureArray ;	

Not tested, just giving you the way to go.

Link to comment
Share on other sites

  • 0

Well, maybe you gotta look harder ^^

 

You should not look in your client code anyways:

 

The following github has every file uncompiled, easy to go trough ^^

 

https://github.com/vbawol/DayZ-Epoch/tree/master/SQF/dayz_code

 

The following code you find in this file:

 

https://github.com/vbawol/DayZ-Epoch/blob/master/SQF/dayz_code/Configs/CfgVehicles/LAND/Ural.hpp

class Ural_Base;
class UralCivil_DZE : Ural_Base {
	scope = 2;
	side = 3;
	faction = "CIV";
	displayName = "Ural (Civil)";
	vehicleClass = "Car";
	crew = "";
	typicalCargo[] = {};
	class TransportMagazines{};
	class TransportWeapons{};
	model = "\ca\wheeled\ural";
	picture = "\Ca\wheeled\data\ico\ural_civil1_CA.paa";
	rarityUrban = 0.3;
	accuracy = 0.22;
	hiddenSelectionsTextures[] = {
		"\ca\wheeled\data\ural_kabina_civ1_co.paa",
		"\ca\wheeled\data\ural_plachta_civ1_co.paa"
	};
};

more in pacticular

hiddenSelectionsTextures[] = {
		"\ca\wheeled\data\ural_kabina_civ1_co.paa",
		"\ca\wheeled\data\ural_plachta_civ1_co.paa"
	};

Now how would u call this data?

_vehicleName = "UralCivil_DZE";
_textureArray = getArray(configFile >> "CfgVehicles" >> _vehicleName >> "hiddenSelectionsTextures[])"; 
// could also be hiddenSelectionsTextures without the []

_counter = 0;
{
_vehicle setObjectTexture [_counter , _x];
_counter = _counter + 1 ;
}forEach _textureArray ;	

Not tested, just giving you the way to go.

 

Pretty sure I already tried that and it didn't work, it just returns "CAMOx", x being the layer index.

Link to comment
Share on other sites

  • 0

Pretty sure I already tried that and it didn't work, it just returns "CAMOx", x being the layer index.

 

Camo1?

 

That seems to be the hiddenselection in the following example.

class Lada2: Lada_base {
	scope = 2;
	hiddenSelections[] = {"Camo1"};
	displayname = "UAZ (Red)";
	accuracy = 1000;
	hiddenSelectionsTextures[] = {"\ca\wheeled2\Lada\Data\Lada_red_CO.paa"};
	rarityUrban = 0.4;

	class Upgrades {
		ItemORP[] = {"Lada2_DZE1",{},{{"ItemORP",1},{"PartEngine",2}}};
	};
};

Maybe try my method, to take hiddenSelectionsTextures instead of hiddenSelections

 

Also based on bohemia documentation: which seems abit weird imo cus it 

 

 

 

Textures object selection with texture named in array. Array has the form [selectionNumber, "Texture"]. 

The selection number is defined through the hiddenselection[]={} array in the vehicle's config (starting with 0).

 

BUt looking in the config then for example:

class Lada1_TK_CIV_EP1: Lada_base {
	expansion = 1;
	scope = 2;
	side = 3;
	faction = "BIS_TK_CIV";
	hiddenSelections[] = {"Camo1","Camo2"};
	hiddenSelectionsTextures[] = {"\CA\wheeled_E\Lada\Data\Lada_ECIV1_CO.paa","\Ca\wheeled_E\Lada\Data\Lada_glass_ECIV1_CA.paa"};
	displayname = "Lada";
	accuracy = 1000;
	rarityUrban = 0.4;
	crew = "";
	typicalCargo[] = {};

	class Upgrades {
		ItemORP[] = {"Lada1_TK_CIV_EP1_DZE1",{},{{"ItemORP",1},{"PartEngine",2}}};
	};
};

There are the samme ammount as hiddenSelection and HiddenSelectionTEXTURES.  So thats why i think their documentation is kinda weird on that part. Since the texture PAA's are in the other array

 

EDIT Extra,

 

Does the documentation maybe means that the call has to be like this:

_vehicle setObjectTexture ["Camo1", "\CA\wheeled_E\Lada\Data\Lada_ECIV1_CO.paa"];

Which seems highly unlikely, since it needs to be a number. So i think Camo1 is just like something to fill up the array so the arrays of hiddensel and hiddenselTexture have the same lengthed

 

The documentation link btw:

 

https://community.bistudio.com/wiki/setObjectTexture

Link to comment
Share on other sites

  • 0

Camo1?

 

That seems to be the hiddenselection in the following example.

class Lada2: Lada_base {
	scope = 2;
	hiddenSelections[] = {"Camo1"};
	displayname = "UAZ (Red)";
	accuracy = 1000;
	hiddenSelectionsTextures[] = {"\ca\wheeled2\Lada\Data\Lada_red_CO.paa"};
	rarityUrban = 0.4;

	class Upgrades {
		ItemORP[] = {"Lada2_DZE1",{},{{"ItemORP",1},{"PartEngine",2}}};
	};
};

Maybe try my method, to take hiddenSelectionsTextures instead of hiddenSelections

 

Also based on bohemia documentation: which seems abit weird imo cus it 

 

 

BUt looking in the config then for example:

class Lada1_TK_CIV_EP1: Lada_base {
	expansion = 1;
	scope = 2;
	side = 3;
	faction = "BIS_TK_CIV";
	hiddenSelections[] = {"Camo1","Camo2"};
	hiddenSelectionsTextures[] = {"\CA\wheeled_E\Lada\Data\Lada_ECIV1_CO.paa","\Ca\wheeled_E\Lada\Data\Lada_glass_ECIV1_CA.paa"};
	displayname = "Lada";
	accuracy = 1000;
	rarityUrban = 0.4;
	crew = "";
	typicalCargo[] = {};

	class Upgrades {
		ItemORP[] = {"Lada1_TK_CIV_EP1_DZE1",{},{{"ItemORP",1},{"PartEngine",2}}};
	};
};

There are the samme ammount as hiddenSelection and HiddenSelectionTEXTURES.  So thats why i think their documentation is kinda weird on that part. Since the texture PAA's are in the other array

 

EDIT Extra,

 

Does the documentation maybe means that the call has to be like this:

_vehicle setObjectTexture ["Camo1", "\CA\wheeled_E\Lada\Data\Lada_ECIV1_CO.paa"];

Which seems highly unlikely, since it needs to be a number. So i think Camo1 is just like something to fill up the array so the arrays of hiddensel and hiddenselTexture have the same lengthed

 

The documentation link btw:

 

https://community.bistudio.com/wiki/setObjectTexture

 

Nevermind it does work, I was using hiddenSelections, hiddenSelectionsTextures does work, it just knocked me off a bit as that isn't documented in this: https://community.bistudio.com/wiki/CfgVehicles_Config_Reference#hiddenSelections, cheers for the help buddy!

Link to comment
Share on other sites

  • 0

Nice! But i'm having some problem.

On this code:

_vehicleName = "CinderWall_DZ";
_textureArray = getArray(configFile >> "CfgVehicles" >> _vehicleName >> "hiddenSelectionsTextures[]"); 
_textureArray is an empty array [] in modular items, because they don't have hiddenSelectionsTextures[].

Can't see anything related to texture on their class:

class CinderWall_DZ: ModularItems {
	scope = 2;
	destrType = "DestructBuilding";
	cost = 100;
	offset[] = {0,1.5,0};
	model="\z\addons\dayz_epoch\models\cinder_wall_full.p3d";
	icon = "\ca\data\data\Unknown_object.paa";
	mapSize = 2;
	armor = 3400;
	displayName = "Cinder Block Wall";
	vehicleClass = "Fortifications";
	maintainBuilding[] = {{"MortarBucket",1}};
	GhostPreview = "CinderWall_Preview_DZ";
	class DestructionEffects : DestructionEffects {
		class Ruin1 {
		simulation = "ruin";
		type = "\z\addons\dayz_epoch\models\wreck_cinder.p3d"; /* path to the object*/
		position = "";
		intensity = 1;
		interval = 1;
		lifeTime = 1;
		};
	};
};
Link to comment
Share on other sites

  • 0

Nice! But i'm having some problem.

On this code:

_vehicleName = "CinderWall_DZ";
_textureArray = getArray(configFile >> "CfgVehicles" >> _vehicleName >> "hiddenSelectionsTextures[]"); 
_textureArray is an empty array [] in modular items, because they don't have hiddenSelectionsTextures[].

Can't see anything related to texture on their class:

class CinderWall_DZ: ModularItems {
	scope = 2;
	destrType = "DestructBuilding";
	cost = 100;
	offset[] = {0,1.5,0};
	model="\z\addons\dayz_epoch\models\cinder_wall_full.p3d";
	icon = "\ca\data\data\Unknown_object.paa";
	mapSize = 2;
	armor = 3400;
	displayName = "Cinder Block Wall";
	vehicleClass = "Fortifications";
	maintainBuilding[] = {{"MortarBucket",1}};
	GhostPreview = "CinderWall_Preview_DZ";
	class DestructionEffects : DestructionEffects {
		class Ruin1 {
		simulation = "ruin";
		type = "\z\addons\dayz_epoch\models\wreck_cinder.p3d"; /* path to the object*/
		position = "";
		intensity = 1;
		interval = 1;
		lifeTime = 1;
		};
	};
};

 

What's the problem bud?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...