Destroy At Position Icon Destroy At Position

This action block will destroy all instances found at the point given, calling the Destroy Event and then the Clean Up Event for all instances found.

Note that this action is based on the collision 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 the instances have no sprite or mask applied, then they will not be destroyed).

 

Action Syntax:

Destroy At Position Action

Arguments:

ArgumentDescription
xThe x position in the room to use.
yThe y position in the room to use.

 

Example:

Destroy At Position ExampleThe above action block code checks for a key-press (the space key) and if one is detected it will destroy all the instances found at the instances relative position.