S
SpiceEdge
Guest
I have written this simple code that just checks if you're hovering over the object and if you press mb_left it does something.
But it doesn't seem to even acknowledge that I'm hovering over the object. I have tried using "place_meeting(mouse_x, mouse_y, self)" and "position_meeting(mouse_x, mouse_y, id)" or "position_meeting(mouse_x, mouse_y, self)" but it doesn't seem to work. And yes the object does have a colision mask and yes I can clearly see that it has been created and is visible on the screen.
Does anyone know what the problem is?
This code is in the step event and has worked correctly in other objects, so I don't know why it doesn't work on this one specifically.
But it doesn't seem to even acknowledge that I'm hovering over the object. I have tried using "place_meeting(mouse_x, mouse_y, self)" and "position_meeting(mouse_x, mouse_y, id)" or "position_meeting(mouse_x, mouse_y, self)" but it doesn't seem to work. And yes the object does have a colision mask and yes I can clearly see that it has been created and is visible on the screen.
Does anyone know what the problem is?
GML:
if (place_meeting(mouse_x, mouse_y, self)) {
show_message("hovering"); //debug
if (mouse_check_button_released(mb_left)) {
//something that I removed from here cuz not necessary
}
}