I am trying to figure out how to play an audio source when our player is clicked on. It is an open world action adventure game. Can anybody suggest the best possible way to do something like this? I do NOT have a lot of programming experience, so please be nice! Thank you!!
the last answer is a good one but here are a few specifics that you will likely want to understand:
OnMouseDown
http://unity3d.com/support/documentation/ScriptReference/MonoBehaviour.OnMouseDown.html
gameObject.audio
http://unity3d.com/support/documentation/ScriptReference/GameObject-audio.html
also check out AudioSource
http://unity3d.com/support/documentation/ScriptReference/AudioSource.html
This has simple steps you can look up.
- How to play a sound.
- How to find out if an object is clicked.
So you just need a scipt on the object to respond when clicked, and then play audio inside there.