Hi you guys, i have this script attached to my player for footstep song when i press w a s and d …
var stepSound : AudioClip;
function Update () {
if (Input.GetKeyDown("w")||Input.GetKeyDown("a")||Input.GetKeyDown("s")||Input.GetKeyDown("d")){
audio.PlayOneShot(stepSound);
}
}
can u please tell me how i can stop the song when im not pressing the keys w a s or d ?
thanks a lot !