Enemy makes our flashlight blink when he is near

Hello, I have to make the flashlight that is inside the first person character star blinking or turn off when the enemy is near us and star work ok when we are in a safe distance we can say 4 metres.

Thanks.
Seba.

Give the player an overlapping safety sphere volume of the desired radius.

  • when the enemy starts overlap → turn flashlight off
  • when the enemy ends overlap → check if enemies are still overlapping the player’s safety sphere
    • no overlaps → turn flashlight on
    • overlaps → do nothing

Use channels and object types to isolate actors who can trigger it:

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