startLoadingScreen: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "<h3 style='display:none'>Bottom Section</h3>" to "") |
Lou Montana (talk | contribs) m (Text replacement - "with [https://community.bistudio.com/wiki/Arma_3:_Cheats#ENDLOAD ENDLOAD cheat code]" to "with the {{Link|Arma 3: Cheats#ENDLOAD|ENDLOAD cheat code}}") |
||
(47 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{RV|type=command | ||
| arma2 | |game1= arma2 | ||
|version1= 1.00 | |||
|1.00 | |game2= arma2oa | ||
|version2= 1.50 | |||
|game3= tkoh | |||
|version3= 1.00 | |||
|game4= arma3 | |||
|version4= 0.50 | |||
|gr1= System | |gr1= System | ||
| 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]]). | |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]]). | |||
{{ | {{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 | Resource can be defined in [[Description.ext]]; it must NOT be defined as {{hl|RscTitles}}! | ||
<spoiler text="See config example"> | <spoiler text="See config example"> | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
Line 29: | 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 36: | Line 44: | ||
linespacing = 1; | linespacing = 1; | ||
}; | }; | ||
class RscPicture | class RscPicture | ||
{ | { | ||
Line 49: | Line 58: | ||
text = ""; | text = ""; | ||
}; | }; | ||
class RscLoadingText : RscText | class RscLoadingText : RscText | ||
{ | { | ||
Line 59: | Line 69: | ||
colorText[] = { 0.543, 0.5742, 0.4102, 1.0 }; | colorText[] = { 0.543, 0.5742, 0.4102, 1.0 }; | ||
}; | }; | ||
class RscProgress | class RscProgress | ||
{ | { | ||
Line 69: | Line 80: | ||
colorBar[] = { 1, 1, 1, 1 }; | colorBar[] = { 1, 1, 1, 1 }; | ||
}; | }; | ||
class RscProgressNotFreeze | class RscProgressNotFreeze | ||
{ | { | ||
Line 80: | Line 92: | ||
texture = "#(argb,8,8,3)color(0,0,0,0)"; | texture = "#(argb,8,8,3)color(0,0,0,0)"; | ||
}; | }; | ||
// end of basic defines | // end of basic defines | ||
Line 101: | Line 114: | ||
colorBackground[] = { 0, 0, 1, 1 }; | colorBackground[] = { 0, 0, 1, 1 }; | ||
}; | }; | ||
class nicePic : RscPicture | class nicePic : RscPicture | ||
{ | { | ||
Line 111: | Line 125: | ||
}; | }; | ||
}; | }; | ||
class controls | class controls | ||
{ | { | ||
Line 117: | Line 132: | ||
text = "$STR_LOADING"; // "Loading" text in the middle of the screen | text = "$STR_LOADING"; // "Loading" text in the middle of the screen | ||
}; | }; | ||
class CA_Progress : RscProgress // progress bar, has to have idc 104 | class CA_Progress : RscProgress // progress bar, has to have idc 104 | ||
{ | { | ||
Line 124: | Line 140: | ||
texture = "\ca\ui\data\loadscreen_progressbar_ca.paa"; | texture = "\ca\ui\data\loadscreen_progressbar_ca.paa"; | ||
}; | }; | ||
class CA_Progress2 : RscProgressNotFreeze // progress bar that will go reverse | class CA_Progress2 : RscProgressNotFreeze // progress bar that will go reverse | ||
{ | { | ||
idc = 103; | idc = 103; | ||
}; | }; | ||
class Name2: RscText // the text on the top-left | |||
class Name2 : RscText // the text on the top-left | |||
{ | { | ||
idc = 101; | idc = 101; | ||
Line 145: | Line 163: | ||
}} | }} | ||
{{ | {{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 151: | Line 169: | ||
** [[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. | |||
* The loading screen can be force-ended with the {{Link|Arma 3: Cheats#ENDLOAD|ENDLOAD cheat code}}. | |||
}} | |||
| [[startLoadingScreen]] [text, resource] | |s1= [[startLoadingScreen]] [text, resource] | ||
|p1= text: [[String]] | |p1= text: [[String]] | ||
|p2= resource | |p2= resource: [[String]] - (Optional) | ||
| [[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 = 0 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 (Config)]] | ||
}} | }} | ||
{{Note | |||
|user= Killzone_Kid | |||
|timestamp= 20151121183800 | |||
|text= The default {{arma3}} loading screen has no control to display text. | |||
}} | |||
The default {{arma3}} loading screen has no control to display text. | |||
Latest revision as of 09:44, 6 September 2024
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 = 0 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.