1
\$\begingroup\$

I am trying to create a sound that increases in speed as the player gets closer to the object. The sound is just a single 'ping' and will increase in frequency as we approach, once we are on top of it, it should play a different sound. I can't seem to get it to work. Here is what I've done in blueprints:

enter image description here

I'm not extremely experienced with Blueprints and I have almost no experience with working with sound in it. From my understanding, the blueprint should be measuring the distance between the object and the player, dividing it by .5, and then returning the sound at that speed.

Currently, I'm getting no sound whatsoever.

\$\endgroup\$
  • \$\begingroup\$ What exactly is your problem? \$\endgroup\$ – MustacheMoses Sep 22 '17 at 2:16
  • \$\begingroup\$ edited, sorry. I'm not getting any sound at all right now. \$\endgroup\$ – ethan codes Sep 22 '17 at 2:17
  • 1
    \$\begingroup\$ As a first test, remove all the distance calculation logic and just add an arbitrary delay of, say, 1.0 (which is 1 second). If that works, then try again with your logic added. My suspicion is that your distance calculation is returning a very high number, which results in a very long delay. i.e. If you are 100 distance units away from the object, your calculation will mean that there will be a 66.67 second delay on the sound playing. Which is a long, long time! \$\endgroup\$ – Jason H Sep 22 '17 at 12:55
  • 1
    \$\begingroup\$ Does the LocatorSound component have an assgned SoundCue? Does it have any attenuation settings? Does it have AutoActivate set? \$\endgroup\$ – JonS Sep 22 '17 at 13:12
  • \$\begingroup\$ @JonS AutoActivate is set, When checking attenuation settings, it just shows "none" with a blank box and then underneath that it gives options to set up so I did all that....As for SoundCue, I'm not sure. I don't see that anywhere. I messed around adjusting various components and then retesting and occasionally I can get it to fire off one time as soon as I start, but it doesn't seem to have any rhyme or reason because I'll change something, then change it back and it won't work. \$\endgroup\$ – ethan codes Sep 23 '17 at 1:50
1
\$\begingroup\$

For anyone looking to fix this problem in the future, the problem was that I imported the sound but didn't actually create a real sound cue. If you right click, select create sound cue, it's pretty self explanatory from there. Also, you can set attenuation manually, but if you are going to be using multiple different sound assets and some of them may have the same attenuation settings, you can create an attenuation asset to reuse! Then just attach the sound cue to the hierarchy of the asset you want the sound to emanate from.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.