I did something similar once. When my Turret acquired a target, I would check if there was also line-of-sight.. if yes, then I would fire a bullet using 'spawn sprite', not 'Turret:On Shoot'. I'm sure I had a reason for doing it that way.. but maybe you could just put a line-of-sight check in the On Shoot event.