Jump to content
Sign in to follow this  
Kydoimos

Damage Textures and HiddenSelections

Recommended Posts

Hiya guys,

 

Was curious to know if anyone might be able to give some advice on a little problem relating to hiddenselections and damage textures. Now, I have a computer screen which correctly shows as damaged when it is hit. I also wanted to add the same screen as a hiddenselection, so it could be emissive and users could change its texture. However, when I add the hiddenselection, it overwrites the damage textures. So, essentially, I can get the damage textures working, and the hiddenselections - but not together! Does anyone know where I'm going wrong? The config is below.

 

Maybe I need to add a new transparent plane, positioned just in front of the screen, for the damage texture switch? But if that works, is that really the only way to do it?

 

Thanks all! Hugely appreciate any help - as always! :D

 

EDIT: If anyone is stumped by a similar issue, it can be fixed by inserting an overlaying, transparent plane. Looks like hiddenselections will overwrite areas that are shared with the damage textures.

class Portable_GCS_Base_F : Portable_GCS_F
	{
		author = "Kydoimos";
		editorCategory = "EdCat_Things";
		editorSubcategory = "EdSubcat_Military";
		displayName = "GCS";
		icon="iconObject_1x1";
		mapSize=2;
		scope = 2;
		_generalMacro = "Portable_GCS_F";
		model = "\data\objects\gcs\portable_GCS.p3d";
		vehicleClass = "military";
		hiddenSelections[] = {"screen_01", "screen_02", "screen_03"};
		hiddenSelectionsMaterials[]={"\data\objects\GCS\GCS_01.rvmat"};
		hiddenSelectionsTextures[]={"\data\objects\GCS\GCS_01_co.paa"};

		class HitPoints : Hitpoints
		{

			class Screen_01 : Screen_01 
  			{ 
   				armor = 0.1; 
   				material = -1; 
   				name = "Screen_01"; 
   				visual = "Screen_01"; 
   				passThrough = 0;
				explosionShielding = 0.4;
				radius = 0.25; 
  			}; 
  
			class Screen_02 : Screen_02
  			{ 
   				armor = 0.1; 
   				material = -1; 
   				name = "Screen_02"; 
   				visual = "Screen_02"; 
   				passThrough = 0; 
				explosionShielding = 0.1;
				radius = 0.25; 
  			}; 

			class Screen_03 : Screen_03
  			{ 
   				armor = 0.1; 
   				material = -1; 
   				name = "Screen_03"; 
   				visual = "Screen_03"; 
   				passThrough = 0; 
				explosionShielding = 0.1;
				radius = 0.25; 
  			}; 
		};

Share this post


Link to post
Share on other sites

Try declaring one texture for each hidden Selections:

 

hiddenSelectionsTextures[]={"\data\objects\GCS\GCS_01_co.paa", "\data\objects\GCS\GCS_02_co.paa", "\data\objects\GCS\GCS_03_co.paa"};

 

 

without changes...

 

hiddenSelectionsTextures[] = {"","",""};

 

if you only want to change one...

 

hiddenSelectionsTextures[] = {"\data\objects\GCS\GCS_01_co.paa","",""};

 

 

you can also declare hidden Selections in the model.cfg

 

sections[]=
{
"screen_01",
"screen_02",
"screen_03"

};

 

You really need to change hiddenSelectionsMaterials?

 

They are just ideas.

But I think you need to declare 3 hiddenSelectionsTextures.

 

Sorry for my bad English :)

Share this post


Link to post
Share on other sites

@abash - thanks for your help, mate! Always appreciated! I managed to do a workaround in the end, by creating a transparent, overlaying plane :D

Share this post


Link to post
Share on other sites

look at vanilla damage textures - they are detailmaps (*_dt.paa) - which get overlaid over the main texture, without requiring extra overlaying planes. You can only have one dt active per "normal" texture though.

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  

×