- If in an Actor BP I use ‘Play Sound at Location’ when I interact with it for example, and the sound is not a Looping sound, do I need to destroy it if I’ve set a reference to it? Or once it has finished playing, it will be destroyed automatically?
’Play sound at location’ does not have an output pin so you can’t store and kill the sound anyway. ‘Spawn sound at location / attached’ will give you a pin and you can kill it, but why bother if it’s only a couple of seconds. If it’s looping / long then yes, you need to kill it.
- If I fade out a Looping sound to 0, and i’ve set a reference to it, Do I need to destroy it after it’s faded, or is this handled automatically?
If you have spawned a sound, setting the output to zero does not kill the sound, it just stops it playing. You still have to kill it / stop it.
- If I need to destroy sounds after they have been played, what is the best/right way of doing this?
Like the 1st question, if I have a sound in a BP Actor which plays whenever i interact or whatever, and is not looping, what happens if I destroy the actor? Is the sound still referenced in memory, do I need to do anything with it? Or because the Actor is destroyed, the reference in it for the sound is also destroyed and I don’t need to do anything?
**If you destroy the BP, everything with it will get killed also, it just may not happen when you want it to. If the timing is tight, you have to control the clean up yourself. **