How Can I make an Audio Dialogue?

Once again, I am making a creepypasta game called “Cupcakes” but I need help with the Audio Dialogues.

It’s like when a character stops talking, I want the next or continue button to appear, and then you get to talk to the other person. And then when they’re done talking I want to load up the next level.

How can I do that?

What you need ist to set up some callback when an AudioClip has finished playing. This can be done in many different ways, depending on which language you code in, your coding level, how “open” dialogue trees are etc…

If all you need is to start a clip, and do something once it’s finished, just use a coroutine:

IEnumerator PlayClipRoutine ( AudioClip clip )
{
audio.clip = clip;
audio.Play();
while( audio.isPlaying )
{
yield return null;
}
}