onPreloadFinished: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " +" to " ") |
Lou Montana (talk | contribs) m (Text replacement - "Since {{arma3}} v1.57 a stackable version of this EH is available:" to "Since {{arma3}} v1.58 a stackable version of this EH is available:") |
||
(13 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{RV|type=command | {{RV|type=command | ||
| arma2 | |game1= arma2 | ||
|1.00 | |version1= 1.00 | ||
|game2= arma2oa | |game2= arma2oa | ||
Line 15: | Line 15: | ||
|gr1= Event Handlers | |gr1= Event Handlers | ||
| Defines an action performed after the preload screen finished. Preload event occurs after briefing screen on mission start.{{Feature | important | This event handler also fires on client after user closes the main map. }} | |descr= Defines an action performed after the preload screen finished. Preload event occurs after briefing screen on mission start. | ||
{{Feature| | {{Feature | important | This event handler also fires on client after user closes the main map. }} | ||
{{Feature|arma3| | |||
* Since {{arma3}} v1.58 a stackable version of this EH is available: [[Arma 3: Mission Event Handlers#PreloadFinished|PreloadFinished]] | |||
* Before that, the [[BIS_fnc_addStackedEventHandler]] and [[BIS_fnc_removeStackedEventHandler]] functions should be used instead.}} | |||
| | |s1= [[onPreloadFinished]] command | ||
|p1= command: [[String]] or [[Code]] | |p1= command: [[String]] or [[Code]] | ||
Line 25: | Line 27: | ||
|r1= [[Nothing]] | |r1= [[Nothing]] | ||
|x1= < | |x1= <sqf>onPreloadFinished {TAG_ReceivingScreenDone = true};</sqf> | ||
|x2= < | |||
|x2= <sqf> | |||
// removes the event immediately after the first run again | |||
onPreloadFinished { TAG_ReceivingScreenDone = true; onPreloadFinished "" }; | |||
</sqf> | |||
|seealso= [[onPreloadStarted]] | |seealso= [[onPreloadStarted]] | ||
Line 33: | Line 38: | ||
<dl class="command_description"> | <dl class="command_description"> | ||
<dt><dt> | <dt><dt> | ||
<dd class="notedate">Posted on | <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 | <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 | ||
<sqf>onPreloadFinished '[fire1] execVM "scripts\startcam.sqf"';</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.<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. | ||
</dd> | |||
</dl> | </dl> | ||
Latest revision as of 19:15, 15 September 2024
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:
- Example 2:
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 disappearedIt will however also run every time a player change graphics settings, alt-tab or do anything else that will trigger the loading screen.onPreloadFinished '[fire1] execVM "scripts\startcam.sqf"';
You will have to script around it with if statements to get it to run only in the beginning of the mission.