Jump to content
Midnighters

Executing a script post mission? Via config.ccp?

Recommended Posts

Hello, I'm starting off new to modding from mission editing.

I was wondering if there was a way to execute  a script packed in a addon to be executed after the mission has started?

thanks. 

Share this post


Link to post
Share on other sites

Config.cpp:

class CfgPatches {
	class mid_addon {
		name = "Mid's addon";
		author = "Mid";
		units[] = {};
		weapons[] = {};
		requiredAddons[] = {"A3_Weapons_F"};
	};
};

class CfgFunctions {
	class mid
	{
		class myTag {
			class myCategory {
            	file = "myFile.sqf";
              	postInit = 1;
         	};
		};
	};
};

myFile.sqf:

myTag_fnc_myFunction = {
	// Your code here
};

More info here:

https://community.bistudio.com/wiki/Functions_Library_(Arma_3)#Adding_a_Function

Share this post


Link to post
Share on other sites
3 hours ago, Neviothr said:

Config.cpp:


class CfgPatches {
	class mid_addon {
		name = "Mid's addon";
		author = "Mid";
		units[] = {};
		weapons[] = {};
		requiredAddons[] = {"A3_Weapons_F"};
	};
};

class CfgFunctions {
	class mid
	{
		class myTag {
			class myCategory {
            	file = "myFile.sqf";
              	postInit = 1;
         	};
		};
	};
};

myFile.sqf:


myTag_fnc_myFunction = {
	// Your code here
};

More info here:

https://community.bistudio.com/wiki/Functions_Library_(Arma_3)#Adding_a_Function

Awesome! Thanks for this! :D

  • 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

×