I want to make a bomb script

You can start with setting an explosion radius for a bomb (a float variable within the bomb blueprint).

Then there are 2 ways:
1. You destroy every mesh of a certain type in the area, regardless if they are covered by something.

2. You only destroy meshes that are not behind any covers.


In the first case you can find all the meshes within the radius (I’d set respective tags for the Meshes, like “Destructable”): and then you Find All Actors With Tag “Destructible” → Foreach Loop → If Get DIstance To < Explosion Radius → Destroy Actor. (Alternatively, you can set a Sphere Collision with the respective radius, and then Get Overlapping Actors → Foreach → If actor has tag → Destroy)


In the second case I’d use Trace By Channel to find those Destructible meshes in multiple directions with the Trace length equal to the Explosion Radius, and destroy the meshes
the trace hits (the same, checking the Actor Tag), but if it hits the obstacle, the meshes behind it are not destroyed.


P.S. It’s a good thing you added he word “script” at the end of the title =)

So i’m making a maze game with puzzle elements being the main point and one area is bombs. I want to use the bombs so that they explode after interacting with them after pressing e. I also want to make it so bombs can explode a certain type of static mesh and only that static mesh. The only problem is that i have no idea where to start or how to even add particles to a model. Any assistance would be greatly appreciated and if any info is needed, just ask.

Had to throw off the FBI somehow and thanks.