|
Re: simple prob
[Re: GaniX]
#408870
10/08/12 18:21
10/08/12 18:21
|
Joined: Nov 2007
Posts: 2,568 Germany, BW, Stuttgart
MasterQ32
Expert
|
Expert
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
|
the camera gets reset if you load a new level so you have to setup the position and angles again i wanna know how to turn off the camera how do you load your level? this should be done in one frame, so you won't notice it
|
|
|
Re: simple prob
[Re: MasterQ32]
#408873
10/08/12 18:47
10/08/12 18:47
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
Do you mean, that the screen should fade to black, then you load a level and then everything becomes visible again?
POTATO-MAN saves the day! - Random
|
|
|
Re: simple prob
[Re: GaniX]
#408876
10/08/12 18:54
10/08/12 18:54
|
Joined: Sep 2009
Posts: 993 Budapest
Aku_Aku
User
|
User
Joined: Sep 2009
Posts: 993
Budapest
|
I would create a big black image and show it on a panel. Alternatively you can set the sun light to zero. And switch off every other lightsources.
Last edited by Aku_Aku; 10/08/12 18:55.
|
|
|
Re: simple prob
[Re: Aku_Aku]
#408880
10/08/12 19:57
10/08/12 19:57
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
here's a simple function as example:
void load_level_fade_black(STRING* _levelname)
{
PANEL* TempPan = pan_create("alpha = 0; flags = SHOW | TRANSLUCENT", 1000); // Create a new temp-panel
BMAP* BmapBlack = bmap_createblack(8, 8, 24); // create an 8x8 black texture
TempPan.bmap = BmapBlack;
TempPan.size_x = screen_size.x; // set x and y size of the panel to the game-resolution
TempPan.size_y = screen_size.y;
var p = 0; // percent (1 - 100)
var Speed = 1.5; // fade-speed per frame
while(p < 100) // fade in
{
p += Speed;
TempPan.alpha = p;
wait(1);
}
TempPan.alpha = 100;
level_load(_levelname); // screen is black, load the level now
p = 100;
while(p > 0) // now the same just backwards
{
p -= Speed;
TempPan.alpha = p;
wait(1);
}
TempPan.alpha = 0;
ptr_remove(TempPan);
ptr_remove(BmapBlack);
}
if you usually use level_load("level.wmb"); you can now use: load_level_fade_black("level.wmb"); instead - which will do exactly the same, just with fading the screen black before loading the level. I simply create a panel and assign a black texture to it with the size 8x8. (2^x textures wich are greater or equal 8x8 px will be repeated seamlessly if the panels' size_x and _y are bigger) Then I set size_x and _y to the applications' resolution so the complete screen gets covered. After that I use a simple linear fade-in to show the panel, load the level and then blend it out again.
Last edited by Kartoffel; 10/08/12 19:58.
POTATO-MAN saves the day! - Random
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|