Issue with "Interrupt Previous Clip" Not Working (Quest Machine)

Announcements, support questions, and discussion for Quest Machine.
Post Reply
skartcher
Posts: 9
Joined: Thu Dec 26, 2024 6:17 am

Issue with "Interrupt Previous Clip" Not Working (Quest Machine)

Post by skartcher »

Hello, is there a reason why the Interrupt Previous Audio clip is not working for me?

Both nodes use the same Audio Source, even tho the "Interrupt Audio" node uses InterruptPreviousClip, it is still playing in addition to the previous one. am I missing something here?
image_2025-01-01_132411754.png
image_2025-01-01_132411754.png (29.37 KiB) Viewed 7779 times
User avatar
Tony Li
Posts: 22871
Joined: Thu Jul 18, 2013 1:27 pm

Re: Issue with "Interrupt Previous Clip" Not Working (Quest Machine)

Post by Tony Li »

Hi,

Passthrough nodes immediately run their Active actions and then their True actions, and then immediately activate their children. In this case, this means the "Play Audio" node immediately runs Active then True actions, then immediately activates "Interrupt audio", which immediately runs its Active then True actions. What actions are on your "Interrupt audio" node?
skartcher
Posts: 9
Joined: Thu Dec 26, 2024 6:17 am

Re: Issue with "Interrupt Previous Clip" Not Working (Quest Machine)

Post by skartcher »

Hey,

Play Audio has an audio action while True.
Inerrupt audio has an audio action with "interrupt Previous Clip" ticked while True
User avatar
Tony Li
Posts: 22871
Joined: Thu Jul 18, 2013 1:27 pm

Re: Issue with "Interrupt Previous Clip" Not Working (Quest Machine)

Post by Tony Li »

Hi,

I'll provide a fix for this today. In the meantime, a workaround is to tick Interrupt Previous Clip on the first Audio quest action, too. Even though no other audio clip is playing, this will mark the first clip as interruptible so that the second clip and interrupt it.
skartcher
Posts: 9
Joined: Thu Dec 26, 2024 6:17 am

Re: Issue with "Interrupt Previous Clip" Not Working (Quest Machine)

Post by skartcher »

Thanks, it is working now after ticking Interrupt Previous Clip for both audios, is it supposed to work like that?
User avatar
Tony Li
Posts: 22871
Joined: Thu Jul 18, 2013 1:27 pm

Re: Issue with "Interrupt Previous Clip" Not Working (Quest Machine)

Post by Tony Li »

Hi,

Please give this a try:

QM_AudioQuestActionPatch_2025-01-02.unitypackage

This change will also be in QM 1.2.51. It doesn't require you to tick Interrupt for both.

In QM 1.2.50 and earlier, if Interrupt was unticked, it would use AudioSource.PlayOneShot(), which is uninterruptible. Now it always uses AudioSource.Play(). If Interrupt is ticked and another audio clip is playing on the specified audio source, it will interrupt that previous clip and play the new one. Otherwise, if the audio source is already playing a clip and Interrupt is NOT ticked, it will allow the previous clip to play instead of interrupting it. (It will skip the audio in this case.)
Post Reply