Does the "get duration" node work on sound cues with multiple inputs of varying length?

So I’ve been trying various methods setting up a non text-based dialogue system with a voiced player character. I’ve got the base interaction between PC and NPC worked out, but I’m having an issue working out the timing of the different sound cues I have set up. As it stands, I’ve figured out how to get the NPC to speak first once the player enters a “conversation” collision and how to set up the PC’s response so it is naturalistic and flows. But because the NPC’s line is made up of several different sound cues, all with differing lengths, there is an unnatural pause if any other input aside from the longest of the NPC’s options is picked. Is there a way to tweak settings so that a “get duration node” takes into account the duration of the input played and not the longest overall?

Welcome back @ShaunOfTheN00bs!

What nodes are you using? Can you bring back some screenshots of your code? There’s a few ways to go about this, one of the options should give a return that maybe could be used… :slight_smile:

Thank you very much.

As for the screenshots, I’d be happy to provide them. I had initially planned to do the sound work in the level blueprint, but as the dialogue got more complex, I thought prudent to create NPC blueprints. This here is the coding for the initial interaction between PC and NPC:

And the contents of the NPC’s first dialogue sound cue, in case it helps:

I would try playing the sound from an audio component so you can access the OnAudioFinished event that will fire when the sound finishes playing. Would look something like this:

1 Like

So would the “SoundBase” node be a reference to the sound cue for the PC’s first line of dialogue?

Yep, you can plug a Sound Cue into the Set Sound function.

Sound Base is just the base class for playable sounds—meaning you could also insert other sound classes like Sound Wave, MetaSound, etc.

In the end, forewent the SetSound node and the references coming from it. Otherwise this worked perfectly for what I was trying to achieve, many thanks