x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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 ... alt text

alt text

Thanks For the help ! And Sorry for my bad english ...

Product Version: UE 4.11
Tags:
zefzefzeffezx.png (144.1 kB)
zdazd.png (72.0 kB)
more ▼

asked Apr 11 '16 at 04:03 AM in Blueprint Scripting

avatar image

R5GAMER
10 1 4 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

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.alt text

more ▼

answered Apr 11 '16 at 06:30 PM

avatar image

Minus_Kelvin STAFF
922 23 5 31

avatar image R5GAMER Apr 11 '16 at 08:26 PM

The sound of the alarm does not start ..I did exactly the same you in you picture ...

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

In the character controller:

Begin Play -> Branch ->

  • True -> Play Sound (Sound Component) -> (Next)

  • False -> (Next)

The actual component should have a fade in / fade out to it so that it sounds natural of course.

more ▼

answered Apr 11 '16 at 04:50 AM

avatar image

SaviorNT
127 9 12 19

avatar image R5GAMER Apr 11 '16 at 02:02 PM

Is possible to screen a example ?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

LEL Sorry i forget the select sound xDDD

thanks all i love you !!!

more ▼

answered Apr 11 '16 at 11:18 PM

avatar image

R5GAMER
10 1 4 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question