Master Cabalist
Member
My global variable, global.lastEx isn't being kept across rooms as far as I can tell. The code is below:
GML:
*/
//CLICK ON TO ENTER LEVEL
/*!!!!!!!!!!!!!*/
//Grasslands
if (mouse_check_button_released(mb_left))
{
//Forest of Anguish
if mouse_x < 390 && mouse_x > 340 && mouse_y > 320 && mouse_y < 370
{
if global.lastEx = 1
{
global.lastEx = 2
global.game_map = 7;
room_goto(SecondLevel)
}
}
}
//go to level 3
//Avalanche
if (mouse_check_button_released(mb_left))
{
show_debug_message("Passed Ex mouse check button");
if (global.lastEx == 2)
{
if mouse_x < 558 && mouse_x > 540 && mouse_y > 301 && mouse_y < 336
{
show_debug_message("Passed border lines Ex")
//global.game_map = 6;
global.game_map = 20;
global.lastEx = 3
room_goto(ThirdLevel)
}
}
}
//////////************LEVEL FOUR*************************/////////////
//The Forge
if (mouse_check_button_released(mb_left))
{
if global.lastEx == 3
{
if mouse_x < 905 && mouse_x > 713 && mouse_y > 267 && mouse_y < 375
{
global.lastEx = 4
global.game_map =30;
show_debug_message("GLOBALGAMEMAP " + string(global.game_map));
room_goto(FourthLevel)
}
}
}
//Deep Jungle
if (mouse_check_button_released(mb_left))
{
//if mouse_x < 489 && mouse_x > 900 && mouse_y > 501 && mouse_y < 950
///{
if mouse_x < 920 && mouse_x >650 && mouse_y > 500 && mouse_y < 628
{
if global.lastEx == 4
{
global.lastEx = 5
global.game_map = 40;
room_goto(FifthLevel)
}
}
}
//It's Desert Monument
if mouse_check_button_released(mb_left)
{
if (global.lastEx == 5)
{
if mouse_x < 753 && mouse_x > 460 && mouse_y > 653 && mouse_y < 726
{
global.lastEx = 6
global.game_map = 50
room_goto(SixthLevel)
}
}
}