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
http://img224.imageshack.us/i/cod2sps2008042320112850jl6.jpg/sr=1
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 } }
wait(-1); //wait 1 second
wait(1); //wait 1 frame