startLoadingScreen: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (edited the note)
(added a working example (not too long I hope ?))
Line 34: Line 34:
<dl class='command_description'>
<dl class='command_description'>
<!-- Note Section BEGIN -->
<!-- Note Section BEGIN -->
<dd class="notedate">Posted on July 15, 2009 - 01:47 (CEST)</dd>
<dd class="notedate">Posted on July 15, 2009 - 01:47 (CEST)</dd>
<dt class="note">'''[[User:Lou Montana|Lou Montana]]'''</dt>
<dt class="note">'''[[User:Lou Montana|Lou Montana]]'''</dt>
<dd class="note">As it stops simulation as well as scene drawing, be sure not to put any [[sleep]] (or [[waitUntil]] if you are checking for in-game changes ; waitUntil for var initialization or script loading is ok) command between '''startLoadingScreen''' and [[endLoadingScreen]].</dd>
<dd class="note">As it stops simulation as well as scene drawing, be sure not to put any [[sleep]] (or [[waitUntil]] if you are checking for in-game changes ; waitUntil for var initialization or script loading is ok) command between '''startLoadingScreen''' and [[endLoadingScreen]].</dd>
<dd class="notedate">Posted on January 18, 2010 - 07:56 (CEST)</dd>
<dt class="note">'''[[User:Lou Montana|Lou Montana]]'''</dt>
<dd class="note">resource has to be defined in description.ext. here is an example :
<code>
// '''basic defines'''
//
class RscText
{
type = 0;
idc = -1;
x = 0;
y = 0;
h = 0.037;
w = 0.3;
style = 0x100;
font = Zeppelin32;
SizeEx = 0.03921;
colorText[] = {1,1,1,1};
colorBackground[] = {0, 0, 0, 0};
linespacing = 1;
};
class RscPicture
{
access=0;
type=0;
idc=-1;
style=48;
colorBackground[]={0,0,0,0};
colorText[]={1,1,1,1};
font="TahomaB";
sizeEx=0;
lineSpacing=0;
text="";
};
class RscLoadingText : RscText
{
style = 2;
x = 0.323532;
y = 0.666672;
w = 0.352944;
h = 0.039216;
sizeEx = 0.03921;
colorText[] = {0.543,0.5742,0.4102,1.0};
};
class RscProgress
{
x = 0.344;
y = 0.619;
w = 0.313726;
h = 0.0261438;
texture = "\ca\ui\data\loadscreen_progressbar_ca.paa";
colorFrame[] = {0,0,0,0};
colorBar[] = {1,1,1,1};
};
class RscProgressNotFreeze
{
idc = -1;
type = 45;
style = 0;
x = 0.022059;
y = 0.911772;
w = 0.029412;
h = 0.039216;
texture = "#(argb,8,8,3)color(0,0,0,0)";
};
//
// '''the loading screen itself'''
//
class Harrier_loadingScreen
{
idd = -1;
duration = 10e10;
fadein = 0;
fadeout = 0;
name = "loading screen";
class controlsBackground
{
class blackBG : RscText
{
x = safezoneX;
y = safezoneY;
w = safezoneW;
h = safezoneH;
text = "";
colorText[] = {0,0,0,0};
colorBackground[] = {0,0,0,1};
};
class nicePic : RscPicture
{
style = 48 + 0x800; // '''ST_PICTURE + ST_KEEP_ASPECT_RATIO'''
x = safezoneX + safezoneW/2 - 0.25;
y = safezoneY + safezoneH/2 - 0.2;
w = 0.5;
h = 0.4;
text = "img\nicePic.paa";
};
};
class controls
{
class Title1 : RscLoadingText
{
text = "$STR_LOADING"; // '''"Loading" text in the middle of the screen'''
};
class CA_Progress : RscProgress // '''progress bar, has to have idc 104'''
{
idc = 104;
type = 8; // '''CT_PROGRESS'''
style = 0; // '''ST_SINGLE'''
texture = "\ca\ui\data\loadscreen_progressbar_ca.paa";
};
class CA_Progress2 : RscProgressNotFreeze // '''progress bar that will go reverse'''
{
idc = 103;
};
};
};
</code>
</dd>
<!-- Note Section END -->
<!-- Note Section END -->
</dl>
</dl>

Revision as of 09:07, 18 January 2010

Hover & click on the images for description

Description

Description:
Shows loading screen with the given text,using the given resource.,When loading screen is shown,simulation and scene drawing is disabled, scripts run at full speed.
Groups:
Uncategorised

Syntax

Syntax:
startLoadingScreen [text] or [text,resource]
Parameters:
[text] or [text,resource]: Array -
Return Value:
Nothing

Examples

Example 1:
startLoadingScreen ["Loading My Mission, please wait..."];

Additional Information

See also:
endLoadingScreenprogressLoadingScreen

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

Notes

Posted on July 15, 2009 - 01:47 (CEST)
Lou Montana
As it stops simulation as well as scene drawing, be sure not to put any sleep (or waitUntil if you are checking for in-game changes ; waitUntil for var initialization or script loading is ok) command between startLoadingScreen and endLoadingScreen.
Posted on January 18, 2010 - 07:56 (CEST)
Lou Montana
resource has to be defined in description.ext. here is an example : // basic defines // class RscText { type = 0; idc = -1; x = 0; y = 0; h = 0.037; w = 0.3; style = 0x100; font = Zeppelin32; SizeEx = 0.03921; colorText[] = {1,1,1,1}; colorBackground[] = {0, 0, 0, 0}; linespacing = 1; }; class RscPicture { access=0; type=0; idc=-1; style=48; colorBackground[]={0,0,0,0}; colorText[]={1,1,1,1}; font="TahomaB"; sizeEx=0; lineSpacing=0; text=""; }; class RscLoadingText : RscText { style = 2; x = 0.323532; y = 0.666672; w = 0.352944; h = 0.039216; sizeEx = 0.03921; colorText[] = {0.543,0.5742,0.4102,1.0}; }; class RscProgress { x = 0.344; y = 0.619; w = 0.313726; h = 0.0261438; texture = "\ca\ui\data\loadscreen_progressbar_ca.paa"; colorFrame[] = {0,0,0,0}; colorBar[] = {1,1,1,1}; }; class RscProgressNotFreeze { idc = -1; type = 45; style = 0; x = 0.022059; y = 0.911772; w = 0.029412; h = 0.039216; texture = "#(argb,8,8,3)color(0,0,0,0)"; }; // // the loading screen itself // class Harrier_loadingScreen { idd = -1; duration = 10e10; fadein = 0; fadeout = 0; name = "loading screen"; class controlsBackground { class blackBG : RscText { x = safezoneX; y = safezoneY; w = safezoneW; h = safezoneH; text = ""; colorText[] = {0,0,0,0}; colorBackground[] = {0,0,0,1}; }; class nicePic : RscPicture { style = 48 + 0x800; // ST_PICTURE + ST_KEEP_ASPECT_RATIO x = safezoneX + safezoneW/2 - 0.25; y = safezoneY + safezoneH/2 - 0.2; w = 0.5; h = 0.4; text = "img\nicePic.paa"; }; }; class controls { class Title1 : RscLoadingText { text = "$STR_LOADING"; // "Loading" text in the middle of the screen }; class CA_Progress : RscProgress // progress bar, has to have idc 104 { idc = 104; type = 8; // CT_PROGRESS style = 0; // ST_SINGLE texture = "\ca\ui\data\loadscreen_progressbar_ca.paa"; }; class CA_Progress2 : RscProgressNotFreeze // progress bar that will go reverse { idc = 103; }; }; };

Bottom Section