Jump to content
Sign in to follow this  
bolo861

How to make addon with a script

Recommended Posts

Hi.

 

I want to make an addon with this script:

["unit", {(_this select 0) setVariable ["ace_movement_loadCoef", 1]}, true] call CBA_fnc_addPlayerEventHandler;

I ve tried following instructions from here:

 

here

 

http://www.ofpec.com/forum/index.php?topic=35205.0

 

and here

 

But it still doesn t work.

 

Any ideas?

 

Thanks

 

  • Like 1

Share this post


Link to post
Share on other sites

I ve inserted something like this, still no luck.

 

class CfgFunctions
{
	class myTag
	{
		class myCategory
		{
			class preInit
			{
				preInit = 1;
				file = '/MyAddon/functions/preInit.sqf';
			};
		};
	};
};

 

  • Like 1

Share this post


Link to post
Share on other sites

OK, I figured it out. If anyone is interested it should look like this:

 

class CfgPatches
{
	class Vmass_Fatigue
	{
		units[]={};
		weapons[]={};
		requiredVersion=1.78;
		requiredAddons[]=
		{
			"Extended_EventHandlers"
		};
	};
};
class Extended_PreInit_EventHandlers
{
	Vmass_Fatigue_Pre_Init="Vmass_Fatigue_Pre_Init_Var = [] execVM ""\Vmass_Fatigue\scripts\preInit.sqf""";
};

 

  • Like 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  

×