Hey there
When my character falls into the water and respawns he hits a collider that triggers a sound to play. If this happens a lot which it might I want it to play 3 different sounds each time they fall into the water that don’t play at the same time. At the moment my script looks like this:
var Sound : AudioClip;
private var hasPlayed = false;
function OnTriggerEnter(){
if(!hasPlayed){
audio.PlayOneShot(Sound);
hasPlayed = true;
}
}
Does anyone know how I would go about doing this or post a script.
I haven’t seen anyone post something like this before so I think if anyone else is wanting help with a similar situation it would really help them too.
Hoping to hear any ideas or help people have to over come this obstacle.