You can always call a function from a script (I know you know that
). You can preProcess such function at the init of a mission (init.sqs or init field of a unit) or during the mission (through script or trigger or whatever). All you must do is:
_MyFunction = preprocessfile "MMK_Func.sqf"
and then use the var:
Returned_Value = _arguments call _MyFunction
Notice that _MyFunction is a local var, so you can only use it within scripts. If you want to use it in the global space just remov the underscore "_".
You can also use the preprocessing while calling the func.:
Returned_value = _arguments call (preprocessfile "MMK_Func.sqf")
I just don't recomend it.
Though I store the returned value in the var 'Returned_value', it doesn't mean that the function returns, indeed, any value! It could just be a simple process without arg return.
#Edit
There's the 'loadFile' too! It works very similarily, however you cannot have comments in the func ('//comment')