it's possible play a music when you see a enemy(see int he screen)

Hi all…
I said all in the title

There is no a way?

Of course there is a way. You need check the distance between you and enemy. When it is less than X then you start the music.

Check the Raycast functions.
Cast a raycast every X ms from player to the enemy, if true play music.
Maybe check the distance like vegetamaker said, so it doesn’t play if he’s far in the distance.

i resolve thanks to all <3

Hey siengried, can you share the solution you found for this? I’m investigating this right now :slight_smile:

i follow a video can i share it?
btw the name is Unreal Engine 4 Tutorial : AI Navigation - Chase and Roam
Of totally unreal
Btw i didn’t solve ahahahha
I created a monster that walks for the level
and when he see you he chase you
Now i put the play sound but the sound is ever played so many times and not 1 times and why when i shake off the monster he stop to roam?

Please help me ç_ç

there is no a way so?

Check the next links. They should give you an idea how to do it: