Play sound only when object is near

Anyone has any idea how to only play a sound when an object is near?
I have this character and I want him to only “hear” the enemy when it’s near. I would really appreciate any help. Thank you!

If: Object “X” plus condition “Distance between two objects”.
Choose your trigger object (for example “enemy1”) and your wished distance in pixels.

Then: Play the Sound “Y”

:slight_smile:

1 Like

another thought is to make the volume of the sound based on the distance between the hero and target

1 Like

Thank you for these ideas @nzandydean and @Ambytar :heart:

1 Like

maybe use spatial sound?

1 Like

Is it ok if you show me how to do it? I would really appreciate it :heart: