2 registered members (Akow, tomaslolo),
1,536
guests, and 12
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
splashscreen problem??!
#352663
01/05/11 01:52
01/05/11 01:52
|
Joined: Sep 2010
Posts: 97
carla_mariz
OP
Junior Member
|
OP
Junior Member
Joined: Sep 2010
Posts: 97
|
i'm creating a splashscreen for my game and my problem is after showing the splash screen, the buttons for the menu won't work. even the mouse over or click. here is the code:
BMAP* splashmap = "SPLASH.jpg";
BMAP* men1 = "ITEMMENU.jpg";
/////////////////////////////////////////////////////////////////
PANEL* splashscreen =
{
bmap = splashmap;
flags = OVERLAY | SHOW;
}
PANEL* logoscreen =
{
layer = 2;
bmap = men1;
pos_x = 0;
pos_y = 0;
button (110, 180, "singleot.tga", "singleot.tga", "singleov.tga", NULL, NULL, overmenuitem);
button (410, 180, "lanot.tga", "lanot.tga", "lanov.tga", NULL, NULL, overmenuitem);
button (20, 260, "optot.tga", "optot.tga", "optov.tga", NULL, NULL, overmenuitem);
button (530, 260, "insot.tga", "insot.tga", "insov.tga", NULL, NULL, overmenuitem);
button (50, 340, "abot.tga", "abot.tga", "abov.tga", NULL, NULL, overmenuitem);
button (490, 340, "exot.tga", "exot.tga", "exov.tga", NULL, NULL, overmenuitem);
flags = OVERLAY | SHOW;
}
//////////////////
function main()
{
freeze_mode = 1;
screen_size.x = 800;
screen_size.y = 600;
mouse_mode = 0;
wait(3);
logoscreen.flags &= ~SHOW;
splashscreen.pos_x = (screen_size.x - bmap_width(splashmap)) / 2;
splashscreen.pos_y = (screen_size.y - bmap_height(splashmap)) / 2;
splashscreen.flags = UNTOUCHABLE | SHOW;
splashscreen.alpha =100;
wait(-2);
while (splashscreen.alpha >= 0)
{
splashscreen.alpha -= 2*time_step;
wait(1);
}
freeze_mode = 0;
splashscreen.flags &= ~SHOW;
bmap_purge(splashmap);
logoscreen.flags = SHOW | OVERLAY;
}
my another question, is there a way on how to make fade in and out for the splash??? pls help me..thanks a lot! ^_^
|
|
|
Re: splashscreen problem??!
[Re: codeChallenged]
#352992
01/07/11 01:41
01/07/11 01:41
|
Joined: Sep 2010
Posts: 97
carla_mariz
OP
Junior Member
|
OP
Junior Member
Joined: Sep 2010
Posts: 97
|
@codeChallenged, it turned into black. it shows nothing.
function splashout();
PANEL* splash1_panel = //splash panel
{
layer = 3;
bmap = "SPLASH.JPG";
pos_x = 0;
pos_y = 0;
}
PANEL* logoscreen = //main menu
{
layer = 2;
bmap = men1;
pos_x = 0;
pos_y = 0;
button (110, 180, "singleot.tga", "singleot.tga", "singleov.tga", NULL, NULL, overmenuitem);
button (410, 180, "lanot.tga", "lanot.tga", "lanov.tga", NULL, NULL, overmenuitem);
button (20, 260, "optot.tga", "optot.tga", "optov.tga", options, NULL, overmenuitem);
button (530, 260, "insot.tga", "insot.tga", "insov.tga", instruct, NULL, overmenuitem);
button (50, 340, "abot.tga", "abot.tga", "abov.tga", NULL, NULL, overmenuitem);
button (490, 340, "exot.tga", "exot.tga", "exov.tga", is_exit_prg, NULL, overmenuitem);
flags = SHOW | OVERLAY;
}
function splashout()
{
splash1_panel.flags = UNTOUCHABLE | SHOW | TRANSLUCENT;
splash1_panel.alpha = 0;
//sound file
while(splash1_panel.alpha <=100)
{
splash1_panel.alpha += 2*time_step;
wait(1);
}
if(splash1_panel.alpha >=100)
{
wait(-10);
splash1_panel.flags &= ~SHOW;
}
logoscreen.flags |= SHOW;
}
function main()
{
// video_screen = 1;
screen_size.x = 800;
screen_size.y = 600;
mouse_map = cur;
mouse_mode = 4;
master_vol = 70; // default volume
soundtrack_handle = media_loop("Pacman.mp3", NULL, soundtrack_volume);
options_pan.flags &= ~SHOW;
ins_pan.flags &= ~SHOW;
exit_pan.flags &= ~SHOW;
logoscreen.flags &= ~SHOW;
}
what might be the problem...? thanks!
|
|
|
Re: splashscreen problem??!
[Re: xbox]
#353000
01/07/11 05:05
01/07/11 05:05
|
Joined: Sep 2010
Posts: 97
carla_mariz
OP
Junior Member
|
OP
Junior Member
Joined: Sep 2010
Posts: 97
|
i've been trying to do this:
function splashout()
{
splash1_panel.flags = UNTOUCHABLE | SHOW | TRANSLUCENT;
splash1_panel.alpha = 0;
//sound file
while(splash1_panel.alpha <=100)
{
splash1_panel.alpha += 2*time_step;
wait(1);
}
while(splash1_panel.alpha >=100)
{
splash1_panel.alpha -= 2*time_step;
wait(1);
}
if(splash1_panel.alpha <=100)
{
wait(-10);
splash1_panel.flags &= ~SHOW;
}
logoscreen.flags |= SHOW;
}
but it doesn't fade out..?
Last edited by carla_mariz; 01/07/11 05:06.
|
|
|
Re: splashscreen problem??!
[Re: carla_mariz]
#353001
01/07/11 05:54
01/07/11 05:54
|
Joined: Oct 2007
Posts: 5,210 İstanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
|
because you said
while(splash1_panel.alpha >=100)
while alpha is GREATER than 100
say
while(splash1_panel.alpha <=0) instead
3333333333
|
|
|
Re: splashscreen problem??!
[Re: Quad]
#353442
01/10/11 12:06
01/10/11 12:06
|
Joined: Sep 2010
Posts: 97
carla_mariz
OP
Junior Member
|
OP
Junior Member
Joined: Sep 2010
Posts: 97
|
|
|
|
|