Endzerhi
Member
I just recently converted a Gamemaker 1.4 project to Gamemaker 2, and I've noticed that the game tends to dip in frames when loading new textures for the first time. In addition to this, mouse_check_button_released functions in my main menu room have stopped working consistently. When clicked, they are supposed to change the room. What's weird is sometimes they work, and sometimes they don't. I use rather large animated sprites for background images on these menus. Could there be some kind of slow down caused by texture pages that causes the mouse functions to stop working? How can I sort out my texture pages to better optimize this sort of project?
if (mouse_x > 1548) && (!global.options_open)
{
//Play game
if (mouse_y > 700) && (mouse_y < 750) && (mouse_check_button_released(mb_left))
room_goto_next();
//Library
if (mouse_y > 750) && (mouse_y < 800) && (mouse_check_button_released(mb_left))
room_goto(rm_artists);
//Options
if (mouse_y > 800) && (mouse_y < 850) && (mouse_check_button_released(mb_left))
global.options_open = true;
//Credits
if (mouse_y > 850) && (mouse_y < 900) && (mouse_check_button_released(mb_left))
room_goto(rm_credits);
//Quit game
if (mouse_y > 900) && (mouse_y < 950) && (mouse_check_button_released(mb_left))
game_end();
};
An additional draw event that I use to draw and highlight the menu options in these same locations confirms that the mouse coordinates are correct when I'm checking for the click. Also, after one of the menu buttons works, that button begins working consistently until I try clicking a different one.
if (mouse_x > 1548) && (!global.options_open)
{
//Play game
if (mouse_y > 700) && (mouse_y < 750) && (mouse_check_button_released(mb_left))
room_goto_next();
//Library
if (mouse_y > 750) && (mouse_y < 800) && (mouse_check_button_released(mb_left))
room_goto(rm_artists);
//Options
if (mouse_y > 800) && (mouse_y < 850) && (mouse_check_button_released(mb_left))
global.options_open = true;
//Credits
if (mouse_y > 850) && (mouse_y < 900) && (mouse_check_button_released(mb_left))
room_goto(rm_credits);
//Quit game
if (mouse_y > 900) && (mouse_y < 950) && (mouse_check_button_released(mb_left))
game_end();
};
An additional draw event that I use to draw and highlight the menu options in these same locations confirms that the mouse coordinates are correct when I'm checking for the click. Also, after one of the menu buttons works, that button begins working consistently until I try clicking a different one.