Hey I'm trying to make a phone ring, I have the phone ringing and when I touch it the voice turns on all I need to do it make the ringing stop. Please help, either by Javascript or something else.
Use a trigger like this:
var Ringing : AudioClip;
var Voice : AudioClip;
function OnTriggerEnter (other : Collider) {
audio.Play("Ringing");
audio.Play("Voice");
}
This is Javascript. To use it, make a sphere. Then, remove the Mesh Rendering component, and change the collider to be a trigger. Then place this script on the trigger, and drag the ringing and the voice sound onto their respective positions in the Inspector. Then place the sphere so it surrounds the phone, representing the range you want your phone to have (how close/far you can be to make it go off). Hope this helps!