how to make loading level

Posted By: jojo1995

how to make loading level - 03/08/11 21:27

how to make loading level like this
http://img224.imageshack.us/i/cod2sps2008042320112850jl6.jpg/sr=1
Posted By: Widi

Re: how to make loading level - 03/08/11 21:31

What do you mean with this picture? The process bar?
If yes, on_level helps here.
Posted By: djfeeler

Re: how to make loading level - 03/08/11 21:32

Read the manual. It's with on_level :

Code:
PANEL* pLoadBar = { layer = 9999; }
function on_level_event(percent)
{
  set(pLoadBar,SHOW | LIGHT);   // switch load bar on
  vec_set(pLoadBar.blue,vector(255,200,200));
  pLoadBar.pos_x = 50;
  pLoadBar.pos_y = 50;
  pLoadBar.size_x = 10 + 3 * percent;   // 10..310 pixels
  pLoadBar.size_y = 10;
  if (percent >= 100) {  // level loading finished    wait(-1.0);          // display the load bar for one further second
    reset(pLoadBar,SHOW);  // switch it off
  }
}



djfeeler
Posted By: jojo1995

Re: how to make loading level - 03/08/11 21:34

thank you
Posted By: TheShooter

Re: how to make loading level - 03/08/11 21:47

One Question. While loading a level, there are no frames. How can then aktualize the progress bar??

sry for my english xD
Posted By: reknak

Re: how to make loading level - 03/09/11 14:09

@TheShooter, I'm a bit a noob with 3dGS, but maybe with

Have action/loop which increases the variable of the window and use
Code:
wait(-1); //wait 1 second

instead of
Code:
wait(1); //wait 1 frame

at the end.

Posted By: Rei_Ayanami

Re: how to make loading level - 03/09/11 14:19

on_level gives you the acutal percent.

void loading(var progress)
{
..
}

...
on_level = loading;
...
© 2024 lite-C Forums