So I am very new to using Unreal Engine and might not understand certain answers to what I imagine is an easy question so bare with me
I’m creating a game and wish for a sound effect to play for the player when my AI is nearby (A heart beat to be specific) I wish the sound to play in the characters ear and not something like a foot step in the distance.
If there’s an added way of controlling the volume or speed as the AI gets closer, that would be perfect, but just a simple Play sound when within this radius and stop playing a sound when they leave would be greatly appreciated!
You might want to use a less frequent the code instead of Event Tick, a timer or a timeline maybe.
This is just one solution. A better way to do it maybe to setup a Collision sphere around the character and check for collisions against AIPawns. In anycase, this is how you modify a sound’s volume(or pitch) at runtime.
Edit: The sound you use in your sound cue should be set to loop(ClockworkOcean thx for reminding)