startLoadingScreen: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Take[ _]On[ _]Helicopters(\|.*)?\]\]" to "{{GameCategory|tkoh|Scripting Commands}}") |
Lou Montana (talk | contribs) m (Text replacement - "\|x([0-9])= *<code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>") |
||
(40 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{RV|type=command | ||
| arma2 | | |game1= arma2 | ||
|version1= 1.00 | |||
|1. | |game2= arma2oa | ||
|version2= 1.50 | |||
| | |game3= tkoh | ||
|version3= 1.00 | |||
| | |game4= arma3 | ||
|version4= 0.50 | |||
{{Informative | | |gr1= System | ||
|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 | | |||
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: | ||
Line 18: | Line 24: | ||
* idc {{=}} 104 - progress (type {{=}} 8). This control's progress is initially set to 0 and can be manipulated with [[progressLoadingScreen]] command. | * 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 | Resource can be defined in [[Description.ext]]; it must NOT be defined as {{hl|RscTitles}}! | ||
<syntaxhighlight lang="cpp"></syntaxhighlight> | <syntaxhighlight lang="cpp"></syntaxhighlight> | ||
<spoiler text="See config example"> | <spoiler text="See config example"> | ||
Line 31: | Line 37: | ||
h = 0.037; | h = 0.037; | ||
w = 0.3; | w = 0.3; | ||
style = 0x100; | style = 0x100; | ||
font = Zeppelin32; | font = Zeppelin32; | ||
SizeEx = 0.03921; | SizeEx = 0.03921; | ||
Line 147: | Line 153: | ||
}} | }} | ||
{{Warning | | {{Feature | Warning | | ||
* The loading screen does '''not''' end by itself and absolutely needs a call to [[endLoadingScreen]] command | * The loading screen does '''not''' end by itself and absolutely needs a call to [[endLoadingScreen]] command | ||
* Game simulation is disabled during Loading Screen operation (at least in single player): | * Game simulation is disabled during Loading Screen operation (at least in single player): | ||
Line 153: | Line 159: | ||
** [[waitUntil]] ''can'' be used to wait for variable initialisation or script loading | ** [[waitUntil]] ''can'' be used to wait for variable initialisation or script loading | ||
}} | }} | ||
{{Feature|arma3 | Use [[BIS_fnc_startLoadingScreen]] to prevent potential usage conflicts.}} | {{Feature | arma3 | Use [[BIS_fnc_startLoadingScreen]] to prevent potential usage conflicts.}} | ||
| [[startLoadingScreen]] [text, resource] | |s1= [[startLoadingScreen]] [text, resource] | ||
|p1= text: [[String]] | |p1= text: [[String]] | ||
|p2= resource (Optional): [[String]] | |p2= resource (Optional): [[String]] | ||
| [[Nothing]] | |r1= [[Nothing]] | ||
|x1= < | |x1= <sqf>startLoadingScreen ["Loading My Mission, please wait..."];</sqf> | ||
|x2= < | |x2= <sqf>startLoadingScreen ["Can't skip loading time...", "MyLoadingRsc"];</sqf> | ||
|x3= < | |x3= <sqf>startLoadingScreen ["Loading My Mission"]; | ||
// code | |||
progressLoadingScreen 0.5; | |||
// code | |||
endLoadingScreen;</sqf> | |||
|x4= < | |x4= <sqf>// 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;</sqf> | |||
| [[endLoadingScreen]] | |seealso= [[endLoadingScreen]] [[progressLoadingScreen]] [[BIS_fnc_startLoadingScreen]] [[import]] | ||
}} | }} | ||
<dl class="command_description"> | |||
<dl class= | |||
<dt><dt> | |||
<dd class="notedate">Posted on November 21, 2015 - 18:38 (UTC)</dd> | <dd class="notedate">Posted on November 21, 2015 - 18:38 (UTC)</dd> | ||
<dt class="note">[[User:Killzone Kid|Killzone Kid]]</dt> | <dt class="note">[[User:Killzone Kid|Killzone Kid]]</dt> | ||
Line 199: | Line 202: | ||
</dd> | </dd> | ||
</dl> | </dl> | ||
Revision as of 11:25, 13 May 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 (Optional): String
- 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 November 21, 2015 - 18:38 (UTC)
- Killzone Kid
- The default Arma 3 loading screen has no control to display text.