Jump to content
Sign in to follow this  
Meatball0311

how to add an init.sqf to gear

Recommended Posts

How would I execute an init.sqf within a addon for a piece of gear?   Would you use class EventHandlers;?  I cannot get it to launch the init.sqf

class CfgPatches {

	class soc_gear {
		units[] = {};
		weapons[] = {};
		requiredVersion = 0.1;
		requiredAddons[] = {"A3_Data_F","A3_Weapons_F","A3_Characters_F","A3_Characters_F_BLUFOR","Extended_EventHandlers"};
		Author[] = {"SOCMOD"};
	};
};

class Extended_Init_EventHandlers {
	class soc_gear {
	
		soc_gear_init = "_this execVM ""\soc_gear\init.sqf""";
	};
};

Share this post


Link to post
Share on other sites

I managed to execute the init.sqf by using CfgFunctions:

class CfgPatches {

	class soc_gear {
		units[] = {};
		weapons[] = {};
		requiredVersion = 0.1;
		requiredAddons[] = {"A3_Data_F","A3_Weapons_F","A3_Characters_F","A3_Characters_F_BLUFOR","Extended_EventHandlers"};
		Author[] = {"SOCMOD"};
	};
};

class CfgFunctions {

	class EXEC_SOC_GEAR_INIT {
	
		class SOC_GEAR_F {
		
			class soc_gear_init
			{
				postInit=1;
                file = "\soc_gear\init.sqf";
                description = "script run after mission started and object initialization is complete";
			};
		};
	};
};

But how do i execute the init.sqf using CBA?

 

SOLVED:

class Extended_PreInit_EventHandlers {

	SOC_GEAR_INIT = "SOC_GEAR_INIT_VAR = [] execVM ""\soc_gear\init.sqf""";
};

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  

×