I have a idea, im at college right now so cant get access to unity. Been on a roll with programming recently. If i make a extra variable in this code then a if statement that basically if a gameobject is hit then it changes the sound to the new variable? I will try it out later
then i can add a new variable for all teh curface types and just add a plane onto the surface with mesh render off…
hmmm
var footsteps : AudioClip;
//INSERT NEW VARIABLE VAR MUD :Audioclip;
function Start()
{
audio.clip = footsteps;
audio.loop = true;
}
// function start_2 ()
{
audio.clip = mud;
audio.loop = true;
}
function Update()
{
if (Input.GetKeyDown (KeyCode.W))
audio.Play();
else if(Input.GetKeyUp (KeyCode.W))
audio.Stop();
}
I already see errors but what you guys think
ill work on some pseudocode tonight