Enemy makes our flashlight blink when he is near

Hi Everynone, I solved in a similar way. Thanks a lot.