I am VERY stuck on this , so i want to play a foot sound when i go over the collider , but this comes up : No appropriate version of ‘UnityEngine.AudioSource.Play’ for the argument list ‘(UnityEngine.AudioClip)’ was found.
The script
#pragma strict
private var footsteps : PlayerFootsteps;
private var footSound : AudioClip;
function Start()
{
footsteps = GameObject.Find("First Person Controller").GetComponent(PlayerFootsteps);
}
function OnTriggerEnter (Col : Collider)
{
if(Col.gameObject.tag == "Player")
{
footsteps.inWater = true;
audio.Play(footSound);
}
}
function OnTriggerExit (Col : Collider)
{
if(Col.gameObject.tag == "Player")
{
footsteps.inWater = false;
audio.Stop(footSound);
}
}