{"name":"onPreloadFinished","title":"onPreloadFinished","type":"command","url":"https://community.bistudio.com/wiki/onPreloadFinished","revid":379455,"updated":"2026-10-31T00:08:48Z","groups":["Event Handlers"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Defines an action performed after the preload screen finished. Preload event occurs after briefing screen on mission start.\n\n> [!IMPORTANT]\n> This event handler also fires on client after user closes the main map.\n\n> [!NOTE]\n> **Arma 3:**\n>\n> - Since Arma 3 v1.58 a stackable version of this EH is available: PreloadFinished\n> - Before that, the BIS_fnc_addStackedEventHandler and BIS_fnc_removeStackedEventHandler functions should be used instead.","syntaxes":[{"syntax":"onPreloadFinished command","params":[{"name":"command","type":"String or Code","type_expr":"String | Code"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"command"}}],"examples":[{"code":["onPreloadFinished {TAG_ReceivingScreenDone = true};"]},{"code":["// removes the event immediately after the first run again\nonPreloadFinished { TAG_ReceivingScreenDone = true; onPreloadFinished \"\" };"]}],"see_also":["onPreloadStarted"],"notes":[{"user":"Tophe","date":"2009-07-24T00:00:00Z","text":"There is a bug in Arma 2 that will make this command execute every time the screen with \"Receiving...\" has been displayed.\nIf this code is put in the Init.sqf it will run the startcam.sqf script when the loading screen has disappeared\n\n```sqf\nonPreloadFinished '[fire1] execVM \"scripts\\startcam.sqf\"';\n```\n\nIt will however also run every time a player change graphics settings, alt-tab or do anything else that will trigger the loading screen.\nYou will have to script around it with if statements to get it to run only in the beginning of the mission."}]}