This is my underwater script it works well when you go into the water it starts to play but how you do that if you walk out of the water so it stops play
var Underwatersound : AudioClip;
function OnTriggerEnter ()
{
audio.Play();
}
plz help
This is my underwater script it works well when you go into the water it starts to play but how you do that if you walk out of the water so it stops play
var Underwatersound : AudioClip;
function OnTriggerEnter ()
{
audio.Play();
}
plz help
HI msborat,
function OnTriggerExit()
{
audio.Stop();
}
See this link for more information.
thanks