W
Wuzzems
Guest
I have an object whose image_alpha I want to gradually increase and then go to the next room. Here's the code that I've made for it. I'm referencing it from another object though.
The "released" variable I made in the create event.
Clicking and releasing on the area I specify seems to do nothing. Changing the alpha directly from obj_transition seems to trigger the final part of the code and go to the next room. So what's causing it not to increase the image_alpha?
Any help is appreciated.
Code:
if (mouse_check_button_released(mb_left)) && (mouse_x > (room_width/2)-64 && mouse_x < (room_width/2)+64) &&
(mouse_y > (room_height/2)-32 && mouse_y < (room_height/2)+32)
{
released = 1;
}
if (released == 1) && (obj_transition.image_alpha < 1)
{
image_alpha += 0.01;
}
if (obj_transition.image_alpha == 1)
{
room_goto(room0);
}
Clicking and releasing on the area I specify seems to do nothing. Changing the alpha directly from obj_transition seems to trigger the final part of the code and go to the next room. So what's causing it not to increase the image_alpha?
Any help is appreciated.