R
royer14
Guest
Hello how are you, as you have read the title, I have difficulties with this code:
this code is in the object called "obj_pause", step event, now when I start the obj_pause in the room, remember that I have 4 buttons on the screen.
When I click the obj_pause, the screen is paused and everything is fine, but when I click somewhere else on a button different, it reacts as if I were pressing the obj_pause.
What can be?
Code:
if position_meeting(x,y,id) && mouse_check_button_pressed(mb_left)
{
if (global.pausee == 0)
{
global.pausee = 1;
instance_create(x-60,y+120,obj_popup)
}
else
{
instance_destroy(obj_popup)
global.pausee = 0;
}
}
When I click the obj_pause, the screen is paused and everything is fine, but when I click somewhere else on a button different, it reacts as if I were pressing the obj_pause.
What can be?