add many sounds to script

Hi...

I want to add five sounds to one object , then play one of these sounds from another script.

so I wrote a script has five sounds then add it to the object.

the problem : I can't play any of these five sounds from another script .

please help me

Java Script please

thanks

1 Answer

1

http://unity3d.com/support/documentation/ScriptReference/GameObject.GetComponent.html

Use GetComponent to get the actual script (You can use Find to find the gameobject with the script), and then do what you need to do it =).