Page 1 of 1

Play/loop Audio until response selected

Posted: Tue Apr 26, 2022 5:08 pm
by Edla
Hi I have set up the dialogue nodes as such, I want the Audio(phonering) to play/loop until the "Pickup the phone" response is selected.
But Audio(phonering) will only play the clip once. How do I make it loop till it's stopped?

Text: Phone is ringing
Sequence -> Audio(phonering)
Response Menu Sequence ->Audio(phonering)

Pickup the phone
Sequence -> AudioStop()

Ignore it --link back to Phone is ringing node

Re: Play/loop Audio until response selected

Posted: Tue Apr 26, 2022 9:05 pm
by Tony Li
Hi,

The sequencer command "Audio(phonering)" will play phonering through the Audio Source component on that dialogue entry node's speaker. If the speaker doesn't have an Audio Source, it will create a default one. Instead, add an Audio Source to the speaker yourself, and tick its Loop checkbox. Or, if you want to play phonering on a different GameObject's Audio Source, specify the GameObject's name as a second parameter, such as: "Audio(phonering, Telephone)"

Re: Play/loop Audio until response selected

Posted: Tue Apr 26, 2022 10:17 pm
by Edla
Great that works.
Thanks

Re: Play/loop Audio until response selected

Posted: Tue Apr 26, 2022 10:36 pm
by Tony Li
Glad to help!