Initialisation Order: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\[\[SQF[ _]syntax" to "[[SQF Syntax") |
Lou Montana (talk | contribs) m (Text replacement - "\[\[Arma 3 ([^ACHJKLMTZ|])([^|]+)\]\]" to "Arma 3: $1$2") |
||
Line 39: | Line 39: | ||
| All | | All | ||
| {{Icon|checked}} | | {{Icon|checked}} | ||
| [[Arma 3 Functions Library]] | | [[Arma 3: Functions Library]] | ||
| | | | ||
| | | | ||
Line 46: | Line 46: | ||
| All | | All | ||
| {{Icon|checked}} | | {{Icon|checked}} | ||
| [[Arma 3 Functions Library]] | | [[Arma 3: Functions Library]] | ||
| [[Scheduler#Unscheduled Environment|Unscheduled]] | | [[Scheduler#Unscheduled Environment|Unscheduled]] | ||
| | | | ||
Line 130: | Line 130: | ||
| All | | All | ||
| {{Icon|checked}} | | {{Icon|checked}} | ||
| [[Arma 3 Functions Library]] | | [[Arma 3: Functions Library]] | ||
| [[Scheduler#Scheduled Environment|Scheduled]]<ref name="enginewaits"/> | | [[Scheduler#Scheduled Environment|Scheduled]]<ref name="enginewaits"/> | ||
| | | |
Revision as of 19:47, 7 April 2021
Whenever a mission is launched (or joined in Multiplayer) certain tasks are performed to ensure the mission's various components are initialised correctly and that everyone is synced in multiplayer games (particularly JIP players). Initialisation order refers to the order in which those tasks are executed and it is important to take into account when setting up the start of a mission.
Event Scripts are a key part of a mission's initialisation order and will be utilised often when working with SQF.
Item | Meaning |
---|---|
Single Player Only | |
Multiplayer Only | |
Order is not guaranteed |
Take note that the order of initialisation is different in single player and multiplayer environments. If an entry is unmarked then it applies to both.
Arma 3
Task | Applies To | JIP | Related To | Exec Environment | Notes |
---|---|---|---|---|---|
Functions with recompile attribute are recompiled | All | Arma 3: Functions Library | |||
Functions with preInit attribute are called | All | Arma 3: Functions Library | Unscheduled | ||
Object Init Event Handlers are called | All | Unscheduled | |||
Expressions of Eden Editor entity attributes are called | Eden Editor: Configuring Attributes | Unscheduled | They are called on the server. isPlayer _entity; does not return true immediately. Once entity has become a player, the entity is transfered to the client.
| ||
Object initialisation fields are called | All | Unscheduled | |||
init.sqs is executed | Singleplayer | N/A | Event Scripts | ||
init.sqf is executed | Singleplayer | N/A | Event Scripts | Scheduled[1] | |
Expressions of Eden Editor scenario attributes are called | All | Eden Editor: Configuring Attributes | Unscheduled | player is not available immediately. | |
Persistent functions are called | Client | BIS_fnc_MP | |||
Modules are initialised | All | ||||
initServer.sqf is executed | Server | N/A | Event Scripts | Scheduled | |
initPlayerLocal.sqf is executed | Client | Event Scripts | Scheduled | ||
initPlayerServer.sqf is executed on the server | Client | Event Scripts | Scheduled | ||
Functions with postInit attribute are called | All | Arma 3: Functions Library | Scheduled[1] | ||
"BIS_fnc_init" variable is set to true | All | Arma 2: Functions Library | |||
init.sqs is executed | Multiplayer | Event Scripts | Scheduled | ||
init.sqf is executed | Multiplayer | Event Scripts | Scheduled |
- ↑ 1.0 1.1 Note that while the environment is Scheduled (canSuspend returns true), the engine seems to wait until the script is done executing, essentially behaving similarly to an Unscheduled environment - infinite loops will freeze the game, uiSleep may pause the game for up to ~20secs (postInit), etc.