so for i can get my character to walk into the trigger which plays the sound but it plays again if he walks back in. how do i deactivate the trigger after the sound stops playing? here is the script.
private var soundPlayed : boolean = false;
var Audio : AudioClip; function OnTriggerEnter(col : Collider) //Play Sound if player enters trigger
{ if (Audio) { AudioSource.PlayClipAtPoint(Audio, transform.position);
if(soundPlayed == false)
{
soundPlayed = true;
//Play Audio
}
}
}