Play Sound and Stop Sound
Hello Everyone !
I create a system alarm for low HP but the sound is doesnt work and i don't understand why ...
Thanks For the help ! And Sorry for my bad english ...
asked Apr 11 '16 at 04:03 AM in Blueprint Scripting
It'll be easier for you to play sounds without an audio component. Check out PlaySoundAtLocation -- just need to get the position you want to play the sound at, then play it. No need to deal with audio components.
If you want to play a sound attached to a scene component, it's probably easiest to use SpawnSoundAttached.
You really only need an audio component if you need to modify the sound while it's playing -- either to change volume, pitch, or stop a looping sound.
In your case, if your low-health warning is indeed a looping sound, just use the SpawnSoundAttached, set your audio component local variable to the audio component that is returned by that BP function. Then in the false case, where you want to turn the loop, check if the audio component variable is valid, and then call stop on it.
In the character controller:
Begin Play -> Branch ->
The actual component should have a fade in / fade out to it so that it sounds natural of course.
LEL Sorry i forget the select sound xDDD
thanks all i love you !!!
answered Apr 11 '16 at 11:18 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here