W
WoNkY
Guest
Using collision_line_list for first time for a laser beam, only need the closest instance id.
This always returns -4, as the instance Id, whatever the mouse is over. Probably an elementary mistake, help welcome.
This always returns -4, as the instance Id, whatever the mouse is over. Probably an elementary mistake, help welcome.
Code:
var list = ds_list_create();
var num = collision_line_list(x, y, mouse_x, mouse_y, all, false, true, list, true);
if num > 0
var temp_id = instance_id_get(list[| 0]) ;
ds_list_destroy(list);
}