startLoadingScreen: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Some wiki formatting) |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 17: | Line 17: | ||
|descr= Shows loading screen with the given text, using the given resource. While loading screen is shown, simulation and scene drawing is disabled, user control is disabled, mouse cursor is hidden, scripts run at full speed (50ms per frame instead of 3ms per frame for [[Scheduler|Scheduled Scripts]]).<br> | |descr= Shows loading screen with the given text, using the given resource. While loading screen is shown, simulation and scene drawing is disabled, user control is disabled, mouse cursor is hidden, scripts run at full speed (50ms per frame instead of 3ms per frame for [[Scheduler|Scheduled Scripts]]).<br> | ||
{{Feature|informative| | {{Feature|informative|2= | ||
By default, [[startLoadingScreen]] will use "RscDisplayNotFreeze" resource.<br> | By default, [[startLoadingScreen]] will use "RscDisplayNotFreeze" resource.<br> | ||
A custom resource can be defined in [[Description.ext]], and a full black background will be used by default - the following controls are supported by the engine: | A custom resource can be defined in [[Description.ext]], and a full black background will be used by default - the following controls are supported by the engine: | ||
* idc | * idc = 101 - text (type = 0) or picture (type = 48). The text will be set to the value provided by the command argument. | ||
* idc | * idc = 103 - progress (type = 8) or animated texture (type = 45). This control indicates global hardcoded mission loading progress and is useless after the mission is loaded. | ||
* idc | * idc = 104 - progress (type = 8). This control's progress is initially set to 0 and can be manipulated with [[progressLoadingScreen]] command. | ||
Resource can be defined in [[Description.ext]]; it must NOT be defined as {{hl|RscTitles}}! | Resource can be defined in [[Description.ext]]; it must NOT be defined as {{hl|RscTitles}}! | ||
Line 165: | Line 165: | ||
|p1= text: [[String]] | |p1= text: [[String]] | ||
|p2= resource | |p2= resource: [[String]] - (Optional) | ||
|r1= [[Nothing]] | |r1= [[Nothing]] | ||
Line 173: | Line 173: | ||
|x2= <sqf>startLoadingScreen ["Can't skip loading time...", "MyLoadingRsc"];</sqf> | |x2= <sqf>startLoadingScreen ["Can't skip loading time...", "MyLoadingRsc"];</sqf> | ||
|x3= <sqf>startLoadingScreen ["Loading My Mission"]; | |x3= <sqf> | ||
startLoadingScreen ["Loading My Mission"]; | |||
// code | // code | ||
progressLoadingScreen 0.5; | progressLoadingScreen 0.5; | ||
// code | // code | ||
endLoadingScreen;</sqf> | endLoadingScreen; | ||
</sqf> | |||
|x4= <sqf>// this structure prevents error-prone or lengthy code to miss endLoadingScreen. | |x4= <sqf> | ||
// this structure prevents error-prone or lengthy code to miss endLoadingScreen. | |||
private _maxTime = diag_tickTime + 30; // max 30s of loading | private _maxTime = diag_tickTime + 30; // max 30s of loading | ||
Line 188: | Line 191: | ||
waitUntil { uiSleep .1; scriptDone _handle || diag_tickTime > _maxTime }; | waitUntil { uiSleep .1; scriptDone _handle || diag_tickTime > _maxTime }; | ||
endLoadingScreen;</sqf> | endLoadingScreen; | ||
</sqf> | |||
|seealso= [[endLoadingScreen]] [[progressLoadingScreen]] [[BIS_fnc_startLoadingScreen]] [[import]] | |seealso= [[endLoadingScreen]] [[progressLoadingScreen]] [[BIS_fnc_startLoadingScreen]] [[import]] |
Revision as of 02:30, 1 August 2022
Description
- Description:
- Shows loading screen with the given text, using the given resource. While loading screen is shown, simulation and scene drawing is disabled, user control is disabled, mouse cursor is hidden, scripts run at full speed (50ms per frame instead of 3ms per frame for Scheduled Scripts).
- Groups:
- System
Syntax
- Syntax:
- startLoadingScreen [text, resource]
- Parameters:
- text: String
- resource: String - (Optional)
- Return Value:
- Nothing
Examples
- Example 1:
- startLoadingScreen ["Loading My Mission, please wait..."];
- Example 2:
- startLoadingScreen ["Can't skip loading time...", "MyLoadingRsc"];
- Example 3:
- startLoadingScreen ["Loading My Mission"]; // code progressLoadingScreen 0.5; // code endLoadingScreen;
- Example 4:
- // this structure prevents error-prone or lengthy code to miss endLoadingScreen. private _maxTime = diag_tickTime + 30; // max 30s of loading startLoadingScreen ["Loading"]; private _handle = [] spawn { // code that may crash or take too long }; waitUntil { uiSleep .1; scriptDone _handle || diag_tickTime > _maxTime }; endLoadingScreen;
Additional Information
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 Nov 21, 2015 - 18:38 (UTC)
- The default Arma 3 loading screen has no control to display text.