• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM Deleting Backgrounds???

A

Aidan K-S

Guest
Hello Everyone I need help with my backgrounds

The problem is that I want to delete my background when new_game == true!

Code:
/// Drawing Buttons

// If we are on home screen, create the main menu buttons
if (global.main_menu == true)
{
    //Creating the buttons
    instance_create(320,50, obj_button_continue);
    instance_create(640,50, obj_button_new_game);
    instance_create(960,50, obj_button_settings);
    instance_create(1280,50, obj_button_credits);
    instance_create(1600,50, obj_button_exit);
}

// If we are in new game

if (global.new_game == true)
{
    //This is what I want to do
    // background_delete(bck_main_screen)
    draw_background(bck_plain,0,0)
    instance_create(760,300,obj_selectable_1);
    instance_create(760,500,obj_selectable_2);
    instance_create(760,700,obj_selectable_3);
    instance_create(960,900,obj_ok);
}
Please answer ASAP this game is being used in a school project!!!:)
 
Well, background_delete permanently gets rid of the background.

Is your background one of the assigned ones in the room editor?

Then just use background_visible[0...7] = false to hide it.

Then you can set it to true to show it again if it is not a new game.
 
A

Aidan K-S

Guest
Well, background_delete permanently gets rid of the background.

Is your background one of the assigned ones in the room editor?

Then just use background_visible[0...7] = false to hide it.

Then you can set it to true to show it again if it is not a new game.
Thank you I will try this!!:)
 
Top