Jump to content
FoxFort

Help with coding of gear randomization

Recommended Posts

Hey everyone !

 

I'm stuck I just can't seem to figure out why my soldiers's head and face gear randomization is not working. 

 

I have been following manual here, but I'm missing something, could someone please assist ?

https://community.bistudio.com/wiki/Arma_3_Characters_And_Gear_Encoding_Guide#FIA_headgear_and_facewear_randomization

 

No errors are reported, nothing happens to units in eden.

 

Example of code:

 

class spu_Soldier_base: I_Soldier_F
	{	
		class EventHandlers: EventHandlers
		{
			init="if (local (_this select 0)) then {[(_this select 0), [], []] call BIS_fnc_unitHeadgear;};";
		};
		headgearList[] =
		{
			"SPU_PatrolCap_blue", 0.33,
			"spu_helmet_blk", 0.33,
			"H_Watchcap_blk", 0.33
		};
		allowedFacewear[] = 
		{
			"G_Balaclava_blk", 0,33,
			"G_Bandanna_blk", 0.33,
			"G_Shades_Black", 0,33
		};
	};
	class spu_soldier_SL: spu_Soldier_base
	{
		author="FoxFort";
		scope=2;
		faction="spu_battalion";
		editorSubcategory="spu_men";
		displayName="Squad Leader";
		nakedUniform="U_BasicBody";
		uniformClass="spu_uniform_01";
		icon="iconManLeader";
		role="Grenadier";
		hiddenSelectionsTextures[]=
		{
			"\spu_data\Data\spu_uniform_01_co.paa"
		};
		hiddenSelections[]=
		{
			"Camo",
			"insignia"
		};
		weapons[]=
		{
			"arifle_TRG21_GL_MRCO_F",
			"hgun_Rook40_F",
			"Throw",
			"Put",
			"Laserdesignator"
		};
		respawnWeapons[]=
		{
			"arifle_TRG21_GL_MRCO_F",
			"hgun_Rook40_F",
			"Throw",
			"Put",
			"Laserdesignator"
		};
		Items[]=
		{
			"FirstAidKit",
			"FirstAidKit"
		};
		RespawnItems[]=
		{
			"FirstAidKit",
			"FirstAidKit"
		};
		magazines[]=
		{
			"30Rnd_556x45_Stanag",
			"30Rnd_556x45_Stanag",
			"30Rnd_556x45_Stanag",
			"30Rnd_556x45_Stanag",
			"30Rnd_556x45_Stanag",
			"30Rnd_556x45_Stanag",
			"30Rnd_556x45_Stanag",
			"16Rnd_9x21_Mag",
			"16Rnd_9x21_Mag",
			"1Rnd_HE_Grenade_shell",
			"1Rnd_HE_Grenade_shell",
			"1Rnd_HE_Grenade_shell",
			"1Rnd_HE_Grenade_shell",
			"1Rnd_HE_Grenade_shell",
			"1Rnd_HE_Grenade_shell",
			"1Rnd_SmokeBlue_Grenade_shell",
			"1Rnd_SmokeOrange_Grenade_shell",
			"Laserbatteries",
			"SmokeShell"
		};
		respawnMagazines[]=
		{
			"30Rnd_556x45_Stanag",
			"30Rnd_556x45_Stanag",
			"30Rnd_556x45_Stanag",
			"30Rnd_556x45_Stanag",
			"30Rnd_556x45_Stanag",
			"30Rnd_556x45_Stanag",
			"30Rnd_556x45_Stanag",
			"16Rnd_9x21_Mag",
			"16Rnd_9x21_Mag",
			"1Rnd_HE_Grenade_shell",
			"1Rnd_HE_Grenade_shell",
			"1Rnd_HE_Grenade_shell",
			"1Rnd_HE_Grenade_shell",
			"1Rnd_HE_Grenade_shell",
			"1Rnd_HE_Grenade_shell",
			"1Rnd_SmokeBlue_Grenade_shell",
			"1Rnd_SmokeOrange_Grenade_shell",
			"Laserbatteries",
			"SmokeShell"
		};
		cost=300000;
		threat[]={1,0.69999999,0.30000001};
		linkedItems[]=
		{
			"SPU_PatrolCap_blue",
			"spu_spcs_black",
			"ItemMap",
			"ItemCompass",
			"ItemWatch",
			"ItemRadio",
			"ItemGPS"
		};
		respawnLinkedItems[]=
		{
			"SPU_PatrolCap_blue",
			"spu_spcs_black",
			"ItemMap",
			"ItemCompass",
			"ItemWatch",
			"ItemRadio",
			"ItemGPS"
		};
	};

 

Share this post


Link to post
Share on other sites

"G_Balaclava_blk", 0,33,

"G_Bandanna_blk", 0.33,

"G_Shades_Black", 0,33

 

 

Commas   -vs-   Periods

Share this post


Link to post
Share on other sites
14 hours ago, Von Quest said:

"G_Balaclava_blk", 0,33,

"G_Bandanna_blk", 0.33,

"G_Shades_Black", 0,33

 

 

Commas   -vs-   Periods

Ah yeah, I've corrected that typo. 

 

Any idea on how to make randomization work?

Share this post


Link to post
Share on other sites

Got it working ! Heh

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

×