position_destroy(x, y);
Argument | Description |
---|---|
x | The x coordinate of where to destroy colliding instances. |
y | The y coordinate of where to destroy colliding instances. |
Returns: N/A
This function simply destroys all instances that are found to be
in collision with the specified position. Collisions are based on
the mask of the instances, and if any part of the mask over-laps
with the target point it then the function will destroy that
instance.
if mouse_check_button_pressed(mb_left)
{
position_destroy(mouse_x, mouse_y);
}
This will destroy all instances that collide with the position of the mouse cursor when the left mouse button is pressed.