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"

If I play a sound at location in a BP how can I stop that sound from playing?

I use the "play sound at location"- node in my blueprint to play a sound, but I want to interrupt it/stop it halfway through. How can I do this?

Product Version: Not Selected
Tags:
more ▼

asked May 29 '14 at 12:04 PM in Blueprint Scripting

avatar image

Thunderstorm
97 10 16 18

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

2 answers: sort voted first

Hello,

Currently Play Sound At Location is just a fire and forget sound and as such doesn't have an AudioComponent (which is needed to start/stop a sound). This was done because we wanted to reduce the AudioComponent churn, however, it has proven somewhat difficult for people who want to use the node. At some point in the not too distant future we want to do something along the lines of adding a fire and forget Play Sound node that behaves the way the current At Location node does and make the At Location node create and return an AudioComponent like the Attached version does.

In the mean time, you might be able to achieve what you are after by doing something like the following:

alt text

In your Blueprint, use the Set Sound node to assign it to an attached Audio Component (added via the Components Tab). You can then play/stop that audio component and specify the location at which the sound is played from with a Set Location node.

Give this a shot,

-W

startstopaudio.png (112.4 kB)
more ▼

answered May 29 '14 at 03:44 PM

avatar image

DizzyWes ♦♦ STAFF
5k 145 64 206

avatar image brunogbrito Sep 03 '14 at 02:09 AM

Thanks for that :) I was missing the ''Set Sound'' > ''New Sound'' parameter, if that gets blank you get no sound.

avatar image blackdoomy Jul 18 '15 at 01:31 PM

I have same issue, did you solve it?

avatar image AudioMech Oct 02 '15 at 11:14 PM

If I want to attach sound to a socket (that I added to a skeletal mesh), would I replace Set World Location with something else?

avatar image FilipeTessaro Mar 01 '16 at 05:44 PM

sadly this method does not work anymore, any other way to control my sounds?

avatar image FilipeTessaro Mar 01 '16 at 05:55 PM

Hello

Forgive me, it wasn´t working because I created a variable from the set sound node and for the above example works you need to add sound components inside the actor, set the default sound cue and then it will works, thanks Wes!!

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

I'm trying to make several objects that i can click on , all of them assigned to the E key.... but i don't understand how to do that without activating all of them at the same time. Is there a way of activating the object which is in proximity to the player ? The standard activation method of current games, Press E to activate and deactivate individual objects that have separate sounds for example.

Cheers.

more ▼

answered Nov 04 '14 at 12:15 AM

avatar image

cubicparanoia
13 1 3 4

avatar image Narghile Jul 18 '15 at 01:35 PM

Hi

You would need to use an array and a menu system or logic system to do this.

Narg

avatar image Growiel Jul 18 '15 at 05:14 PM

Put a activation radius sphere (using a collision sphere) aroung your object and when the player overlaps with this sphere (he is "close enough") then you use the Enable Input node and when he exists overlap, use Disable Input.

Exactly like they do in the docs here: https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/ActorInput/Blueprints/index.html#enable/disableinputusage

(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