Functions Library – Arma 3 Talk
(→Function initialization order is wrong: new section) |
|||
Line 17: | Line 17: | ||
Addon: | Addon: | ||
Functions are compiled when addon is loaded | Functions are compiled when addon is loaded | ||
== Function initialization order is wrong == | |||
In my testing, init.sqf is executed before initServer, initPlayerLocal, etc. Worth adding that initServer and all those other files effectively run post-init. |
Revision as of 20:55, 25 February 2015
Looking across the CfgFunctions class, there are also those Attributes: headerType, cheatsEnabled that are not referenced here. -Floriangeyer
- Those are system attributes and are used only in special cases. I didn't consider them significant enough to be descibed publicly. -Str (talk) 18:10, 28 March 2014 (CET)
Explain how and when functions are compiled
edit: i was going to post a reply but i guess this will do, also where are my line breaks
I've talked with plenty of rookies who didn't understand that functions are compiled BEFORE the mission starts / init fields are called, so they were calling their functions using preInit and just exiting if that was the params.
My suggestion is that someone who knows the exact compile steps for functions add that just above "init order".
From my understanding it's goes something like this;
Mission: In editor: cfgFunctions from description.ext are compiled when mission loaded/previewed/restarted (since you don't have to add recompile flag and don't have to save like with cfgSounds to be read when changed?) MP: Functions are compiled when "start" is pressed?
Addon: Functions are compiled when addon is loaded
Function initialization order is wrong
In my testing, init.sqf is executed before initServer, initPlayerLocal, etc. Worth adding that initServer and all those other files effectively run post-init.