onPreloadFinished: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Replaced <code> with <sqf>)
m (Text replacement - ">Posted on July ([0-9]{2})[ a-zA-Z]*, ([0-9]{4})" to ">Posted on $2-07-$1")
Line 38: Line 38:


<dt><dt>
<dt><dt>
<dd class="notedate">Posted on July 24, 2009</dd>
<dd class="notedate">Posted on 2009-07-24</dd>
<dt class="note">[[User:Tophe|Tophe]]</dt>
<dt class="note">[[User:Tophe|Tophe]]</dt>
<dd class="note">There is a bug in {{arma2}} that will make this command execute every time the screen with "Receiving..." has been displayed.<br>
<dd class="note">There is a bug in {{arma2}} that will make this command execute every time the screen with "Receiving..." has been displayed.<br>

Revision as of 23:09, 13 May 2023

Hover & click on the images for description

Description

Description:
Defines an action performed after the preload screen finished. Preload event occurs after briefing screen on mission start.
This event handler also fires on client after user closes the main map.
Arma 3
Groups:
Event Handlers

Syntax

Syntax:
onPreloadFinished command
Parameters:
command: String or Code
Return Value:
Nothing

Examples

Example 1:
onPreloadFinished {TAG_ReceivingScreenDone = true};
Example 2:
// removes the event immediately after the first run again onPreloadFinished { TAG_ReceivingScreenDone = true; onPreloadFinished "" };

Additional Information

See also:
onPreloadStarted

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Posted on 2009-07-24
Tophe
There is a bug in Arma 2 that will make this command execute every time the screen with "Receiving..." has been displayed.
If this code is put in the Init.sqf it will run the startcam.sqf script when the loading screen has disappeared
onPreloadFinished '[fire1] execVM "scripts\startcam.sqf"';
It will however also run every time a player change graphics settings, alt-tab or do anything else that will trigger the loading screen.
You will have to script around it with if statements to get it to run only in the beginning of the mission.