Jump to content

Recommended Posts

Hello,

 

I am making a weapon sight for arma 3 with a custom model. I want to add some texture variations and i understood i can achieve this with hiddenselections. The problem is that I cant seem to get another texture assigned to it ingame. I looked over a number of other threads dealing with hiddenselections, but so far i could not find out where i am going wrong with this.

 

My model has a selection named "camo" in Object builder: 

 

Spoiler

K8AV8nV.png

 

This is the Model.cfg, I just added this in the mod directory, do i need to assign the model.cfg to the model somewhere?

class CfgModels
{

	class Default
	{
		sectionsInherit = "";
		sections[] = {};
		skeletonName = "";
	};

	class Andor_hartman_mh1 : Default
	{
		sections[] = 
		{
		
		"camo"
		
		};
	};
};

 

This is the config.cpp:

 

#include "basicDefines_A3.hpp"
#include "CfgPatches.hpp"

class asdg_OpticRail;
class asdg_OpticRail1913: asdg_OpticRail
{
	class compatibleItems
	{
		Andor_hartman_mh1 = 1;
		Andor_hartman_mh1_tan = 1;
		Andor_hartman_mh1_olive = 1;
	};
};



class cfgWeapons
{
	class ItemCore;
	class InventoryItem_Base_F;
	class InventoryOpticsItem_Base_F;
	class Andor_hartman_mh1: ItemCore
	{
		displayName="Hartman MH1 (Black)";
		author= "Andor";
		picture="\Andor_Hartman_mh1\Data\Hartman_mh1_icon_ca.paa";
		model = "\Andor_Hartman_mh1\Andor_hartman_mh1";
		scope = 2;
		descriptionShort = "Hartman MH1";
		weaponInfoType = "RscWeaponZeroing";
		hiddenSelections[] = {"camo"};
		hiddenSelectionTextures[] = {"\Andor_Hartman_mh1\Data\Hartman_mh1_CO.paa"};

		class ItemInfo: InventoryOpticsItem_Base_F
		{
			mass = 6;
			//opticType = 1;
			optics = true;
			modelOptics="\A3\Weapons_F\empty";
			class OpticsModes
			{
				class Hartman_mh1_optic
				{
					opticsID = 1;
					useModelOptics = 0;
					opticsZoomMin = 0.25;
					opticsZoomMax = 1.25;
					opticsZoomInit = 0.75;
					memoryPointCamera = "eye";
					opticsFlare = 0;
					opticsDisablePeripherialVision = 0;
					distanceZoomMin = 200;
					distanceZoomMax = 200;
					cameraDir = "";
					visionMode[] = {};
					opticsPPEffects[] = {"OpticsBlur1"};
				};
			};
			
		};
		inertia = 0;
	};

	class Andor_hartman_mh1_tan: Andor_hartman_mh1
	{
		author= "Andor";
		displayName="Hartman MH1 (Tan)";
		hiddenSelections[] = {"camo"};
		hiddenSelectionTextures[] = {"\Andor_Hartman_mh1\Data\Hartman_mh1_Tan_CO.paa"};
	};
	
		class Andor_hartman_mh1_olive: Andor_hartman_mh1
	{
		author= "Andor";
		displayName="Hartman MH1 (Olive)";
		hiddenSelections[] = {"camo"};
		hiddenSelectionTextures[] = {"\Andor_Hartman_mh1\Data\Hartman_mh1_Olive_CO.paa"};
	};

};

 

The default texture i assigned in Object builder loads on all 3 variants. I have the feeling i am forgetting something simple??

Any help is much appreciated.

Share this post


Link to post
Share on other sites
6 hours ago, road runner said:

do you have the selection in your model.cfg?

Yes, I have posted the model.cfg in my post.

Share this post


Link to post
Share on other sites
2 minutes ago, roberthammer said:

HiddenSelections doesn't work with attachments - reason unknown (probably some stupid one)

Of course, yeah I have replied to this, when I was trying to help another guy with a shemagh floating between legs issue.

Andor, disregard my post, it wont make sense to you Rob Hammer is correct.

  • Like 1

Share this post


Link to post
Share on other sites
16 hours ago, roberthammer said:

HiddenSelections doesn't work with attachments - reason unknown (probably some stupid one)

 

Ah okay, that is a bummer. So what is the best alternative? Do i just make 3 p3d's with the different textures?

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

×