Announcement

Collapse
No announcement yet.

Can't get Audio Component to Play !?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Can't get Audio Component to Play !?

    Hi all,

    Perhaps someone can help explain what I am missing here? I am trying to play a sound that I can turn off later..... I know i need to use an Audio Component, not a fire and forget Play Sound at Location... but for the life of me i cannot get an audio component to even play? Here is my script. Bottom works just fine, but top does nadda.... I am stoopid or?

    Click image for larger version

Name:	audiocomponent.png
Views:	1
Size:	113.6 KB
ID:	1148756

    #2
    Use Play sound attached, it has a Return value which you can use for the Stop function. You don't actually need an audio component either. See example below.

    Click image for larger version

Name:	oYyO8wx.png
Views:	1
Size:	370.6 KB
ID:	1075197
    Last edited by DEDRICK; 04-26-2015, 07:36 PM.

    Comment


      #3
      With the way you have it setup there is no location for the sound to play at. DEDRICK's version add's it into a location on the scene so that you can hear it.

      Comment


        #4
        Thanks for that. Make sense, although I'm not sure then what the play()function is then for exactly.

        If I am just wanting to play background music or music in a menu system, what should I attach the component to?

        Comment


          #5
          Just a thought, what are the attenuation settings on the SoundCue you're using? The PlaySoundAtLocation function is playing from the world origin location (0,0,0) but your AudioComponent function is playing from wherever the origin of that Blueprint is. But in general, and AudioComponent is the way to do this .
          Best-
          Zak
          Zak Belica
          Audio Director, Epic Games

          Comment


            #6
            There has been pass 5 years sice you post this problem you have, if you still have it, the you should create the sound component first, and then you can use the sound component to assign sound, playing them and get an event when playing the sound finish. I post an image to represent waht you need to do.

            First create the component, if not, it will be empty.
            Click image for larger version

Name:	CrearAudioComponent.jpg
Views:	927
Size:	106.6 KB
ID:	1719691

            And now use it.

            Click image for larger version

Name:	UsarAudioComponent.jpg
Views:	915
Size:	208.9 KB
ID:	1719692

            In the example, i use some variables to play sounds in my game's presentation, i am recycle the audio files when one of then finish playing.
            Hope this helps, if you do not find your answer in this five years, and sorry for the delay.

            Comment


              #7
              Thanks a lot! This helps

              Comment

              Working...
              X