Hi i have a problem, i want to explode all the bricks that is around the boom brick entity when hit by the ball but in the code i made the upper bricks and the boom brick will automatically explode though the ball is not hitting the center boom brick. can i ask some advice please?.

here is my code:

function time_bomb()
{
while(!player){wait(1);}
c_setminmax(my);
my.z = player.z;
set(my, POLYGON);
my.emask |= (ENABLE_IMPACT | ENABLE_ENTITY |ENABLE_SCAN | ENABLE_DETECT);
my.event = boom_explosion;

while (1)
{
c_scan(my.x, my.pan, vector(50,50,50), SCAN_ENTS | SCAN_LIMIT | IGNORE_ME);
wait (1);
}
}
}


function boom_explosion()
{
if (event_type == EVENT_DETECT)
{
my.z = player.z;
snd_play(explosion,100, 0);
effect(p_fountain,maxv(1,40*time_step),my.x,vector(0,0,5));
set (me, INVISIBLE);
ent_remove(my);

}

}