void main()
{
void s;
void value = getlocalvar("value");
void max = getlocalvar("max");
void percent;
void dot;
if(max==1) return;
percent=value*100/max;
percent%=++percent;
dot=percent%3;
if(dot==0)
s=".";
else if(dot==1)
s="..";
else
s="...";
drawstring(180,160,0,"% Complete"+s);
}
utunnels said:No smooth animation though, because while loading a model the entire application is blocked until it is done.
Volcanic said:You should use script.
Loading.c is the only thing that can help you.
Example(Loading.c):
Code:void main() { void s; void value = getlocalvar("value"); void max = getlocalvar("max"); void percent; void dot; if(max==1) return; percent=value*100/max; percent%=++percent; dot=percent%3; if(dot==0) s="."; else if(dot==1) s=".."; else s="..."; drawstring(180,160,0,"% Complete"+s); }
Of cource you can draw animated sprites in this function if you like.
void main()
{
void s;
void value = getlocalvar("value");
void max = getlocalvar("max");
if(max==1){
return;
}else{}
void percent=value*100/max;
percent%=++percent;
void dot=percent%3;
if(dot==0)
s=".";
else if(dot==1)
s="..";
else
s="...";
drawstring(143,242,0,"Loading Models..."+percent);
drawstring(259,242,0,"% Complete"+s);
drawbox(0,260,480,15,11,rgbcolor(0,122,133),0);
drawbox(0,260,percent*480*0.01,15,15,rgbcolor(0,233,233),0);
}
loadingbg 1 -1113 -1194 100 -1138 -1220
loadingbg2 1 -1113 -1194 100 -1138 -1220
loadingbg 1 -1113 -1194 100 -1138 -1220
loadingbg2 1 -1113 -1194 100 -1138 -1220