add better custom script support
All checks were successful
Generate testing snapshot / Create testing release (push) Successful in 37s

This commit is contained in:
2024-02-19 09:46:06 -08:00
parent c29e46d5f7
commit a20f477ee0
2 changed files with 12 additions and 0 deletions

11
custom_scripts.hpp Normal file
View File

@@ -0,0 +1,11 @@
// This file's contents will be included in the mission's CfgFunctions section, and serves to give you a place to define custom functions from files you've placed in /scripts.
class milsim_scripts {
class functions {
file = "scripts";
// Add your custom functions here, like so:
// class init {postInit = 1;}; // refers to scripts/fn_init.sqf. postInit=1 means it will be run on each machine when they're done loading the mission.
// class customFunction1 {}; // refers to the file scripts/fn_customFunction1.sqf, and is called as milsim_scripts_fnc_customFunction1
// class customFunction2 {}; // refers to the file scripts/fn_customFunction2.sqf, and is called as milsim_scripts_fnc_customFunction2
};
};

View File

@@ -97,6 +97,7 @@ class Params
// CfgFunctions // CfgFunctions
class CfgFunctions { class CfgFunctions {
#include "framework\CfgFunctions.hpp" #include "framework\CfgFunctions.hpp"
#include "custom_scripts.hpp"
}; };