Jump to content
Sign in to follow this  
mikkol

Hideturret help in config.cpp

Recommended Posts

Hey!

i have retextured MSE-3 Marid, but now i would like to have "unarmed" version of it.

i know that you can use "this animate["hideturret",1];" in the editor.

but, how i can get "hideturret" work in config.cpp

i tried this but not working.

/*extern*/ class DefaultEventHandlers;

class CfgPatches {

class Marid_black_ML
{
	units[] = {"Marid_Black1_ML"};
	weapons[] = {};
	requiredVersion[] = {"0.100000"};
	requiredAddons[] = {"A3_Armor_F"};
};
};

class CfgVehicles {
/*extern*/ class O_APC_Wheeled_02_rcws_F;

class Marid_black_ML: O_APC_Wheeled_02_rcws_F 
{
	scope = 2;
	_generalMacro = "O_APC_Wheeled_02_rcws_F";
	displayName = "Marid Black ML";
	side = 1;
	crew = "B_crew_F";
	faction = "BLU_F";
	vehicleClass = "Armored";
	condition = "(alive this)";
[color="#FF0000"]		statement = "this animate (""hideturret"",1)";[/color]
	hiddenSelections[] = {"Camo1", "Camo2", "Camo3"};
	hiddenSelectionsTextures[] = {"ML_Addons\Marid\marid1.paa", "ML_Addons\Marid\marid2.paa", "ML_Addons\Marid\marid1.paa"};
   };
};

Share this post


Link to post
Share on other sites

Add the script command in an init event handler:

		class eventHandlers
	{
		init = "_this animate (""hideturret"",1);";
	};

Share this post


Link to post
Share on other sites

Thanks!

i will try that.

---------- Post added at 09:32 AM ---------- Previous post was at 09:24 AM ----------

Edit. For some reason it's not working.

Is something wrong with this ? init = "_this animate (""hideturret"",1);";.

i also checked this page, https://community.bistudio.com/wiki/ArmA:_Event_Handlers

EDIT 2.

Now it working. Needed to add class AnimationSources

/*extern*/ class DefaultEventHandlers;


class CfgPatches {

class Marid_black_ML
{
	units[] = {"Marid_Black1_ML"};
	weapons[] = {};
	requiredVersion[] = {"0.100000"};
	requiredAddons[] = {"A3_Armor_F"};
};
};

class CfgVehicles {
/*extern*/ class O_APC_Wheeled_02_rcws_F;

class Marid_black_ML: O_APC_Wheeled_02_rcws_F 
{
	scope = 2;
	_generalMacro = "O_APC_Wheeled_02_rcws_F";
	displayName = "Marid Black ML";
	side = 1;
	crew = "B_crew_F";
	faction = "BLU_F";
	vehicleClass = "Armored";
	hiddenSelections[] = {"Camo1", "Camo2", "Camo3"};
	hiddenSelectionsTextures[] = {"ML_Addons\Marid\marid1.paa", "ML_Addons\Marid\marid2.paa", "ML_Addons\Marid\marid1.paa"};
	class eventHandlers
	{
		init = "_this animate (""hideturret"",1);";
	};
   };
};

Edited by MikkoL

Share this post


Link to post
Share on other sites

Can be, I didn't tested it ingame. :p

Try this:

init = "_this select 0 animate (""hideturret"",1);";

Share this post


Link to post
Share on other sites

I still can't get it to work.... i get an error saying " ( " is missing.

 

I tried  init = "_this animate (""hideturret"",1);"

       

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  

×