Hello there,
I have a previous code that uses a simple OnTriggerEnter function to activate the animation and audio, it works correctly, however when I add the && Input.GetKeyDown function nothing happens when I press the key. Can anyone help?
var VoiceSound : AudioClip;
var TapeRecorder : GameObject;
function OnTriggerEnter(col: Collider)
{
if (col.gameObject.tag == "Player" && Input.GetKeyDown(KeyCode.E))
{
AudioSource.PlayClipAtPoint(VoiceSound, transform.position);
TapeRecorder.GetComponent.<Animation>().Play();
}
}