Hi, I want to play audio mp3 in the dialogue scene, but I need to use Audio() because it will still continue playing the dialogue while mp3 still playing. But Idk why when i use it, its just skipped it and not play the audio.
Audio(Audio/HeavyBreathingslowlyup);
Audio(Audio/SimpleHeartbeat)
Using Audio() instead AudioWait()
Re: Using Audio() instead AudioWait()
Hi,
If you don't specify a subject, it will use the speaker GameObject's audio source. This means the first command will use the speaker's audio source to play HeavyBreathingslowlyup, and then the second command will stop the audio source to play SimpleHeartbeat instead.
Two options:
1. Specify different subjects, such as:
This assumes the scene has GameObjects named PlayerMouth and PlayerHeart. It will play audio on those GameObjects.
2. Or use 'oneshot' to play the audio clips in a detached "one shot" manner that won't interrupt each other:
In the example above, I didn't specify a subject (hence the ",,"), but you could specify one if you want.
If you don't specify a subject, it will use the speaker GameObject's audio source. This means the first command will use the speaker's audio source to play HeavyBreathingslowlyup, and then the second command will stop the audio source to play SimpleHeartbeat instead.
Two options:
1. Specify different subjects, such as:
Code: Select all
Audio(Audio/HeavyBreathingslowlyup, PlayerMouth);
Audio(Audio/SimpleHeartbeat, PlayerHeart)
2. Or use 'oneshot' to play the audio clips in a detached "one shot" manner that won't interrupt each other:
Code: Select all
Audio(Audio/HeavyBreathingslowlyup,,oneshot);
Audio(Audio/SimpleHeartbeat,,oneshot)
Re: Using Audio() instead AudioWait()
Thank you