wallside 1 Posted August 19, 2013 Hello, can someone tell me what's the correct location to define custom per-mission functions? The problem with the init.sqf seems to be, that it isn't guaranteed to be executed before scripts in init-fields (where I want to use those functions). Share this post Link to post Share on other sites
Johnson11B2P 3 Posted August 19, 2013 There isn't any "set in stone" locations for custom functions. You can put them in a functions folder. If it is a custom function that you made then I suggest create a file called functions.sqf. You can place this file along side your init.sqf or in a folder but usually I just leave along side the init. Inside your init.sqf put this line of code in the file execVM "functions.sqf"; Make sure that the game reads the functions before the functions are being called. Share this post Link to post Share on other sites
kylania 568 Posted August 19, 2013 /wiki/Functions_Library_(Arma_3)#Initialization_Order Object Init fields execute in 4th place. Multiplayer init.sqf executes in 15th place. So no, init.sqf will never run before init fields. :) Check that link to see when everything happens. Share this post Link to post Share on other sites
wallside 1 Posted August 19, 2013 (edited) Make sure that the game reads the functions before the functions are being called. Well, exactly that was my problem. kylania, if I read your link (thx!) correctly, functions declared inside the description.ext are available right at the beginning? Edited August 19, 2013 by wallside wrong username Share this post Link to post Share on other sites
mantls 2 Posted August 19, 2013 you could put a waitUntil in there to wait for your functions.sqf to be finished before continueing. functions = [] execVM "functions.sqf"; waitUntil {scriptDone functions}; Share this post Link to post Share on other sites
wallside 1 Posted August 19, 2013 Thank you all, I think the link from kylania has answered my question conclusively. Share this post Link to post Share on other sites