Problem with Audio Component not playing

Hi. I have this problem with this dialogue system I used. The audio components are not playing and I don’t really know why. If someone can help me I will really appreciate it.
Here is where I choose the sound I want to be played.

And here are the blueprints to get this done.



Hey @EmpireM5!

Unfortunately we can’t really help you yet. The “PlayDialogue” function is not being used anywhere…

Go ahead and get the rest of the blueprint for us and I think I have a pretty solid idea of why it isn’t working because you’re not loading in your soft reference. First you’re checking if your audio is a SOFT reference, and then if it is a soft reference you continue… but then you do an IsValid check and if it is not valid you load it into hard memory. Problem is, a soft reference can still return Valid.

So you would really want to take that isValid check out and IF it is a valid soft object, load it into hard memory with “Load Dialogue Audio” then setsound, play. :slight_smile:

Edit: a quick protip: You can right click on any “Get” node and use “Change to Validated Get” and it turns it into an IsValid check of that variable!

Hi friend! Thank you so much for answering!
Do you mean this isValid?


Btw i don’t use the “PlayDialogue” on any part of the blueprints. This is all I have that has to do with the sound.
Here is where I change the sound and it should play this but it doesn’t.

For some reason when I open the proyect, the first time I interact with the character THE SOUND IS PLAYED?! But then I stop the simulation and start it again and it never heard again.
But just the first one, the other ones never play.

Too low resolution pictures… I can’t see.

Yup, that’s the one.
You see, a soft reference is just basically giving you a way to load a specific thing without holding the entire game in memory. You have to load it, THEN throw it onto what is looking for it. :slight_smile:

But when is not valid on the function that sais load audio that’s where i load the soft reference

Yes, that is correct. However a soft reference will return as “True” on the IsValid check, so you’re probably never actually loading it. :slight_smile: