triggertime audio cues playing infinitely and overlapping

working on this system that lets me play audio at certain trigger times, however when it comes to the first trigger im getting multiple loops overlapping of the audio playing infinitely past the trigger time, ive tried so may ways to fix it :sob: can anyone help me?

1 Like

Are you calling it on tick?

yes i am

1 Like

Well let’s say cue 0 is going to run after time X. Then you call your loop from tick, it sees that its time to start the cue, next frame, its still time to run the cue, it starts another copy, next frame, its still time to run the cue, it starts another copy…

Like that? :slight_smile:

If you deleted the cue when you played it, it would ( might ) work better maybe. But you have to remove the index when you get to the end of the loop. ForEach doesn’t work if you remove things during the loop.