function glass_shot()
{
if(event_type == EVENT_SHOOT && (mouse_left) && (player_shooting) && (ammo[current_weapon] > 0) && (player_health > 0))
{
effect_sprite("acti.bmp",glass_broken,20,myplayer.x,nullvector); //The download link for "glass_piece.tga" is lying below
my.skill100 = 1;
}
}
action glass_action1()
{
my.pan += 360;
set(my,POLYGON);
my.emask |= ENABLE_SHOOT;
my.event = glass_shot;
if(is(my,TRANSLUCENT) == 0) set(my,TRANSLUCENT);
my.alpha = 50;
while (!my.skill100) wait (1);
wait (1);
ptr_remove (me);
}