Is there a way to make a custom-shaped collison?

I need a collision about the shape of these two big boxes, but they can’t overlap the same actor twice. Is there a way to combine the two or make a script to blacklist an item during my foreachloop after it’s already gone through that once?

You can use custom static meshes to detect overlaps; you aren’t limited to built-in collision shapes