please help with small bug in game

Posted By: gamingfan101

please help with small bug in game - 07/10/09 21:00

hi, my game starts in the main menu, when i click on the credits button, the credits come up as i want them to. But if i click back to main menu, then the credits and my main menu show. How can i stop that from happening? heres my function to go to the credits and then my function to go back.


function credits()
{
menupicture.flags = 0;
mainbutton1.flags = 0;
endubutton2.flags = 0;
creditbutton3.flags = 0;
exitbutton4.flags = 0;
headertxt.flags = 0;
maintxt.flags = 0;
endurancetxt.flags = 0;
creditstxt.flags = 0;
exittxt.flags = 0;
bground.flags = SHOW | OVERLAY;
back.flags = SHOW;
backbutt.flags = SHOW | OVERLAY;
wait(-3);
handle = media_play("credits.wav", NULL, 100);
wait(-1);
opening_txt.flags = SHOW;
wait(-4);
boxieopener_txt.flags = SHOW;
wait(-4);
opening_txt.flags = 0;
boxieopener_txt.flags = 0;
wait(-2);
screen_color.red = 135;
screen_color.green = 62;
screen_color.blue = 36;
owner_txt.flags = SHOW;
wait(-4);
owner_txt.flags = 0;
screen_color.red = 0;
screen_color.green = 62;
screen_color.blue = 36;
character_txt.flags = SHOW;
wait(-4);
character_txt.flags = 0;
screen_color.blue = 0;
screen_color.green = 88;
screen_color.red = 88;
level_txt.flags = SHOW;
wait(-4);
level_txt.flags = 0;
screen_color.red = 177;
screen_color.green = 239;
screen_color.blue = 135;
object_txt.flags = SHOW;
wait(-4);
object_txt.flags = 0;
screen_color.blue = 0;
screen_color.red = 0;
screen_color.green = 0;
instructions_txt.flags = SHOW;
}



function mainmenu()
{
bground.flags = 0;
back.flags = 0;
backbutt.flags = 0;
opening_txt.flags = 0;
boxieopener_txt.flags = 0;
opening_txt.flags = 0;
boxieopener_txt.flags = 0;
owner_txt.flags = 0;
owner_txt.flags = 0;
character_txt.flags = 0;
character_txt.flags = 0;
level_txt.flags = 0;
level_txt.flags = 0;
object_txt.flags = 0;
object_txt.flags = 0;
instructions_txt.flags = 0;
menupicture.flags = OVERLAY | SHOW;
mainbutton1.flags = OVERLAY | SHOW;
endubutton2.flags = OVERLAY | SHOW;
creditbutton3.flags = OVERLAY | SHOW;
exitbutton4.flags = OVERLAY | SHOW;
headertxt.flags = OVERLAY | SHOW;
maintxt.flags = OVERLAY | SHOW;
endurancetxt.flags = OVERLAY | SHOW;
creditstxt.flags = OVERLAY | SHOW;
exittxt.flags = OVERLAY | SHOW;
}

thanks for the help.
Posted By: DJBMASTER

Re: please help with small bug in game - 07/10/09 21:05

look in the manual for 'Set' and 'Reset'. These are macros that allow you to show/hide objects.
© 2024 lite-C Forums