#####[ Destruction Help ]##### Engine(s): LateralGM+Enigma or Game Maker Language: Game Maker Language (GML) Last updated: 2023/07/18 Destroy all instances of a particular object -------------------------------------------- If for some reason you need to destroy all instances of a particular object, use the following in a script: with (obj_example) instance_destroy(); Destroy all obj_enemy objects within a certain distance ------------------------------------------------------- Let us pretend that your player has a grenade. When that grenade is thrown, you can have it destroy all obj_enemy instances within 50 pixels of the released obj_grenade by using this in a script in the obj_grenade instance: with (obj_enemy){ if (distance_to_object(self) < 50) instance_destroy(); } ...However, you will want to add a timer of some sort before the explosion if actually needing this for a grenade; otherwise, I can see it being used for something like a rocket-launcher that explodes on impact or a laser-cutter that clears everything in its path. Speaking of, perhaps a light-saber or sword? That way, it works on anything within reach of an object and its swinging animation rather than a simple object and sprite-change vs object collision? Hmmm... Destroy ALL objects close-by ---------------------------- If you are a total pyro-maniac with a thirst for absolute destruction, run the following if you want EVERY object to be destroyed within 50 pixels of the instance by running the following in a script: with (all){ if (distance_to_object(other) < 50) instance_destroy(); }