D
Daniel Cáceres
Guest
I'm trying to create a new instance object if there is not another instance that collides with at cursor coordinates. The thing is that the new instance is created if I click in an empty space, both if it collides or not.
if (mouse_check_button_pressed(mb_left)) {
if (instance_position(mouse_x, mouse_y, obj_myobject) == noone){
instance_create_layer(mouse_x, mouse_y, "instances",obj_myobject);
}
}
Thnak you
if (mouse_check_button_pressed(mb_left)) {
if (instance_position(mouse_x, mouse_y, obj_myobject) == noone){
instance_create_layer(mouse_x, mouse_y, "instances",obj_myobject);
}
}
Thnak you