How can I get an event to trigger after a random audio cue is finished?

I have a cue container that has random samples. They vary greatly in length. I want to break out of a sequence, play an audio cue, wait until that cue is finished and then continue.

Think of it this way. If you were swapping in different words in a sentence, you would pause after a word, play the random word, then continue the sentence.

You have different options:

  • Link an event (in blueprint) to the OnAudioFinished callback of the audio component responsible for playing the sound cue: this will allow you to trigger anything from a blueprint
  • Within the cue itself, use the sound node concatenator to append sound waves to each other: this looks more like what you’re trying to do but isn’t really dynamic as you can’t put much logic in sound cues.