onPreloadFinished: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "[[Arma_3:_Event_Handlers/addMissionEventHandler" to "[[Arma 3: Mission Event Handlers") |
Lou Montana (talk | contribs) m (Text replacement - "<code>([^ ]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^ ]*)<\/code>" to "<code>$1$2$3</code>") |
||
Line 27: | Line 27: | ||
|r1= [[Nothing]] | |r1= [[Nothing]] | ||
|x1= <code> | |x1= <code>onPreloadFinished {TAG_ReceivingScreenDone = [[true]]};</code> | ||
|x2= <code>{{cc|removes the event immediately after the first run again}} | |x2= <code>{{cc|removes the event immediately after the first run again}} | ||
Line 42: | Line 42: | ||
<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> | ||
If this code is put in the Init.sqf it will run the startcam.sqf script when the loading screen has disappeared | If this code is put in the Init.sqf it will run the startcam.sqf script when the loading screen has disappeared | ||
<code> | <code>onPreloadFinished '[fire1] [[execVM]] "scripts\startcam.sqf"';</code> | ||
It will however also run every time a player change graphics settings, alt-tab or do anything else that will trigger the loading screen.<br> | It will however also run every time a player change graphics settings, alt-tab or do anything else that will trigger the loading screen.<br> | ||
You will have to script around it with if statements to get it to run only in the beginning of the mission. | You will have to script around it with if statements to get it to run only in the beginning of the mission. |
Revision as of 11:12, 12 May 2022
Description
- Description:
- Defines an action performed after the preload screen finished. Preload event occurs after briefing screen on mission start.
- 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 July 24, 2009
- 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 disappearedonPreloadFinished '[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.