Why cant any of my functions be found in the animation?

I Have my weapons set up and my animations working with mechanim, and i want to call an attack damage function inside the animation so that my attacks will line up with damage, but, I cant find in the animator where is says add animation event any functions.
This is my code of the melee script controlling the animations and melee damage.

Code:

var TheDammage : int = 50;
var Distance : float;
var MaxDistance : float = 1.5;
var DammageDelay : float = 0.6;
var TheAnimator : Animator;
var Playerstate : float;
private var Hit01Streak = 0;
private var Hit02Streak = 0;

	



function Update ()
{
	PlayerStateController();
	PlayerAnims();
}

function PlayerStateController ()
{
	if (Input.GetAxis("Vertical") !=0 || Input.GetAxis("Horizontal") !=0)
	{
		if (Input.GetButton("Sprint"))
		{
			Playerstate = 2;
		}
		else
		{
			Playerstate = 1;
		}
	}
	else 
	{
		Playerstate = 0;
	}
	if (Input.GetButton("Fire1"))
		{
			Playerstate = 3;
		}
			
}

function PlayerAnims ()
{
	if (Playerstate == 0)
	{
		TheAnimator.SetBool("Sprinting", false);
		TheAnimator.SetFloat("Playerstate", 0);
	}
	if (Playerstate == 1)
	{
		TheAnimator.SetBool("Sprinting", false);
		TheAnimator.SetFloat("Playerstate", 1);
	}
	if (Playerstate == 2)
	{
		TheAnimator.SetBool("Sprinting", true);
		TheAnimator.SetFloat("Playerstate", 2);
	}
	if (Playerstate == 3)
	{		
		TheAnimator.SetFloat("Playerstate", 3);
		if (Random.value >= 0.5 && Hit01Streak <= 2)
		{
			TheAnimator.SetBool("Hit01", true);
			Hit01Streak += 1;
			Hit02Streak = 0;
		}
		else
			{
			if (Hit02Streak <= 2)
			{
				TheAnimator.SetBool("Hit02", true);
				Hit01Streak = 0;
				Hit02Streak += 1;
			}
			else
			{	
				TheAnimator.SetBool("Hit01", true);
				Hit01Streak += 1;
				Hit02Streak = 0;
			}
		}
		yield WaitForSeconds(DammageDelay);
		TheAnimator.SetBool("Hit01", false);
		TheAnimator.SetBool("Hit02", false);
	}

}


function AttackDammage ()
{
	//Actual attacking
	var hit : RaycastHit;
	var ray = Camera.main.ScreenPointToRay(Vector3(Screen.width/2, Screen.height/2, 0));
	if (Physics.Raycast (ray, hit))
	{
		Distance = hit.distance;
		if (Distance < MaxDistance)
		{
			hit.transform.SendMessage("ApplyDammage", TheDammage, SendMessageOptions.DontRequireReceiver);
			Debug.Log("Hit");
		}
	}
}
  1. Open your FBX file with the animation you want to trigger the event
  2. Go to Animations tab, select your hit animation
  3. Scroll down find Events tab, expand it and click little + icon
  4. Drag the event bar to the place where you want it to trigger the event (alternatively you first scroll the animation to desired position than add event)
  5. In event window in “Function” field type the method you want to be triggered (AttackDammage) - no brackets
  6. In “Object” field drag your script that contains this method.
  7. Apply changes to animation and voila !

Just tested with humanoid type of animation and works perfectly29315-1.png